<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Richard K Miller &#187; How To</title>
	<atom:link href="http://richardkmiller.com/category/how-to/feed" rel="self" type="application/rss+xml" />
	<link>http://richardkmiller.com</link>
	<description></description>
	<lastBuildDate>Sun, 11 Mar 2012 00:27:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Script to enable/disable DMZ on Linksys and Verizon routers</title>
		<link>http://richardkmiller.com/879/script-to-enable-disable-dmz-on-linksys-and-verizon-routers</link>
		<comments>http://richardkmiller.com/879/script-to-enable-disable-dmz-on-linksys-and-verizon-routers#comments</comments>
		<pubDate>Mon, 05 Jul 2010 22:49:28 +0000</pubDate>
		<dc:creator>Richard K Miller</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[FamilyLink.com]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[dmz]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[verizon]]></category>

		<guid isPermaLink="false">http://richardkmiller.com/?p=879</guid>
		<description><![CDATA[Your home Internet router gives you some protection against direct attacks on your computer by keeping your home network safely encapsulated. Each of your home computers can access the Internet (this is called NAT), but no outsider can access your &#8230; <a href="http://richardkmiller.com/879/script-to-enable-disable-dmz-on-linksys-and-verizon-routers">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class='microid-213dec2bb13a80e3975bcc3aee3d230c3f6b044f'><p>Your home Internet router gives you some protection against direct attacks on your computer by keeping your home network safely encapsulated. Each of your home computers can access the Internet (this is called NAT), but no outsider can access your computers directly. Outsiders only see the router. However, sometimes you want your computer to be &#8220;fully&#8221; online. Enter the &#8220;DMZ&#8221; feature of your router. <strong>Your router&#8217;s DMZ allows one of your computers to be fully exposed to the Internet (for better or worse).</strong></p>
<p>Reasons to enable your DMZ:</p>
<ul>
<li>Access your files while away from home.</li>
<li>Serve web pages from your computer.</li>
<li>Make BitTorrent transfers faster. BitTorrent transfers are usually faster when your computer is directly exposed to the Internet.</li>
</ul>
<p>For my work at FamilyLink.com, I develop directly on my local machine. While working on our Facebook application, I need to allow Facebook servers to directly access my machine. (When you use a Facebook app, you&#8217;re accessing Facebook&#8217;s servers and Facebook servers are, in turn, accessing the developer&#8217;s server via a callback URL. While working on our Facebook app, Facebook directly accesses my local machine.) This requires me to open my machine to the DMZ.</p>
<p>Reasons not to enable your DMZ:</p>
<ul>
<li>Your computer is more likely to be hacked</li>
<li>Your private data is more likely to be accessed</li>
</ul>
<p>If you enable your DMZ, know which services are enabled on your machine and which files and data are being shared. There may be files you&#8217;re comfortable sharing on your local network that you wouldn&#8217;t want to share with the world. Only enable the DMZ as long as necessary.</p>
<p>Enabling the DMZ can be a pain &#8212; logging into your router and navigating to the correct setting &#8212; so I wrote the following Ruby scripts to make it easy. The first worked with the Linksys router I had. (I believe it was a WRT54G.) To use, fill in your router&#8217;s IP address and password, and your computer&#8217;s hardware address, then type &#8220;linksys_dmz.rb on&#8221; or &#8220;linksys_dmz.rb off&#8221; at the command-line. The script looks up your computer&#8217;s hardware address in the table of local IP addresses so the IP address can safely change from time to time.</p>
<pre class="brush: ruby; title: ;">
#!/usr/bin/env ruby
# linksys_dmz.rb

router = '10.1.1.1'
user = 'admin'
pass = 'your_password'
hardware_address = '00:23:6C:00:00:00'

leases = `curl -su #{user}:#{pass} http://#{router}/DHCPTable.asp`
leases.scan(%r{'([^']+)', hardware_address}) do |m|
  ip_address = m[0].strip.to_s
  last_digit = ip_address.split('.').last
  if $*[0] == 'open' || $*[0] == 'on'
    post_values = &quot;submit_button=DMZ&amp;change_action=&amp;action=Apply&amp;dmz_enable=1&amp;dmz_ipaddr=#{last_digit}&quot;
    print &quot;Opening DMZ to #{ip_address}\n\n&quot;
  else
    post_values = &quot;submit_button=DMZ&amp;change_action=&amp;action=Apply&amp;dmz_enable=0&quot;
    print &quot;Closing DMZ\n\n&quot;
  end
  `curl -su #{user}:#{pass} -e http://#{router}/DMZ.asp -d '#{post_values}' http://#{router}/apply.cgi`
end
</pre>
<p>Last year I switched to Verizon FIOS, which came with its own wireless router, so I had to write a new script. Again, fill in the password, then type &#8220;verizon_dmz.rb on&#8221; or &#8220;verizon_dmz.rb off&#8221; in Terminal. (This script assumes a 10.1.1.* network. Change it to 192.168.1.* if that&#8217;s what you have.)</p>
<p>As a side note, the Verizon router was a bit of beast to automate. It uses a hashed signature to try to enforce JavaScript-enabled browsers. Writing this script required using TamperData, Charles Proxy, and a lot of trial and error to discover which POST data were necessary.</p>
<p>I use this script to open the DMZ before working on our Facebook app, then I close it when I&#8217;m done for the day. Eventually, it&#8217;d be nice to find a way to enable the DMZ remotely &#8212; maybe via email or something.</p>
<pre class="brush: ruby; title: ;">
#!/usr/bin/env ruby
# verizon_dmz.rb

require 'rubygems'
require 'mechanize'
require 'digest/md5'

user = 'admin'
pass = 'your_password'

localhost = `ifconfig`.scan(/inet (\d+\.\d+\.\d+\.\d+).*broadcast 10.1.1.255/).join
router    = localhost.gsub(/\d+$/,'1')

begin
    agent = Mechanize.new
    page = agent.get(&quot;http://#{router}:81&quot;)
rescue Exception
    abort &quot;Unable to connect to Verizon Router! Check the IP address.&quot;
end

form = page.forms[0]
auth_key = form.fields.find {|f| f.name == 'auth_key'}.value
form.fields.find {|f| f.name == 'user_name'}.value = user
form.fields.find {|f| f.name == 'md5_pass'}.value = Digest::MD5.hexdigest(pass + auth_key)
form.fields.find {|f| f.name == 'mimic_button_field'}.value = 'submit_button_login_submit%3A+..'
form.method = &quot;POST&quot;
form.submit

post = {
    'dmz_host_cb_watermark' =&gt; '1',
    'dmz_host_ip0' =&gt; localhost.split('.')[0],
    'dmz_host_ip1' =&gt; localhost.split('.')[1],
    'dmz_host_ip2' =&gt; localhost.split('.')[2],
    'dmz_host_ip3' =&gt; localhost.split('.')[3],
    'active_page'  =&gt; '9013',
    'mimic_button_field' =&gt; 'submit_button_login_submit%3A+..',
}

if $*[0] == 'open' || $*[0] == 'on'
   post['dmz_host_cb'] = '1'
   puts &quot;Opening DMZ to #{localhost}&quot;
else
    puts &quot;Closing DMZ&quot;
end

agent.post('/index.cgi', post)
</pre>
</div>]]></content:encoded>
			<wfw:commentRss>http://richardkmiller.com/879/script-to-enable-disable-dmz-on-linksys-and-verizon-routers/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>iPhone tip: Use a Silent Ringtone to Screen Calls in Your Sleep</title>
		<link>http://richardkmiller.com/702/iphone-tip-use-a-silent-ringtone-to-screen-calls-in-your-sleep</link>
		<comments>http://richardkmiller.com/702/iphone-tip-use-a-silent-ringtone-to-screen-calls-in-your-sleep#comments</comments>
		<pubDate>Fri, 07 Aug 2009 04:33:30 +0000</pubDate>
		<dc:creator>Richard K Miller</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Getting Things Done]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://richardkmiller.com/?p=702</guid>
		<description><![CDATA[Have you ever wished your iPhone would ring only when certain people call? Here&#8217;s how to do it: Download the &#8220;Silence&#8221; ringtone here: silence.m4r Copy this file into the Ringtones section of your iTunes. (Click to enlarge.) Sync your iPhone &#8230; <a href="http://richardkmiller.com/702/iphone-tip-use-a-silent-ringtone-to-screen-calls-in-your-sleep">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class='microid-77038d20900c5f596e02c0e0978d89896b5387ee'><p>Have you ever wished your iPhone would ring only when <em>certain</em> people call? Here&#8217;s how to do it:</p>
<ol>
<li>Download the &#8220;Silence&#8221; ringtone here: <a href="http://richardkmiller.com/wp-content/uploads/2009/08/silence_ringtone.php">silence.m4r</a></li>
<li>Copy this file into the Ringtones section of your iTunes. (Click to enlarge.)<br />
<br />
<a href="http://richardkmiller.com/wp-content/uploads/2009/08/adding_ringtone_to_itunes.png" rel="lightbox[702]"><img src="http://richardkmiller.com/wp-content/uploads/2009/08/adding_ringtone_to_itunes-300x192.png" alt="adding_ringtone_to_itunes" title="adding_ringtone_to_itunes" width="300" height="192" class="alignnone size-medium wp-image-715" /></a>
</li>
<li>Sync your iPhone with iTunes to load the ringtone.</li>
<li>On your iPhone, change your ringtone to &#8220;Silence&#8221; (under <em>Settings</em> -> <em>Sounds</em> -> <em>Ringtone</em>). You&#8217;ll no longer hear your phone calls.<br />
<br />
<a href="http://richardkmiller.com/wp-content/uploads/2009/08/2_iphone_silence_ringtone.png" rel="lightbox[702]"><img src="http://richardkmiller.com/wp-content/uploads/2009/08/2_iphone_silence_ringtone-200x300.png" alt="2_iphone_silence_ringtone" title="2_iphone_silence_ringtone" width="200" height="300" class="alignnone size-medium wp-image-709" /></a>
</li>
<li>For each person whose calls you still want to hear, change his or her Custom Ringtone to something audible: Click the name in your contact list, choose <em>Ringtone</em>, then choose something besides <em>Default</em><br />
<br />
<a href="http://richardkmiller.com/wp-content/uploads/2009/08/3_iphone_important_caller.png" rel="lightbox[702]"><img src="http://richardkmiller.com/wp-content/uploads/2009/08/3_iphone_important_caller-200x300.png" alt="3_iphone_important_caller" title="3_iphone_important_caller" width="200" height="300" class="alignnone size-medium wp-image-710" /></a> <a href="http://richardkmiller.com/wp-content/uploads/2009/08/4_iphone_audible_ringtone.png" rel="lightbox[702]"><img src="http://richardkmiller.com/wp-content/uploads/2009/08/4_iphone_audible_ringtone-200x300.png" alt="4_iphone_audible_ringtone" title="4_iphone_audible_ringtone" width="200" height="300" class="alignnone size-medium wp-image-711" /></a>
</li>
</ol>
<p>Now you can screen calls in your sleep. Because Sunday afternoons are for napping.</p>
<p>UPDATE (Apr 14, 2011): I haven&#8217;t used it, but <a href="http://mrnumber.com/">MrNumber.com</a> appears to be an interesting service for identifying phone numbers belonging to telemarketers and blocking them.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://richardkmiller.com/702/iphone-tip-use-a-silent-ringtone-to-screen-calls-in-your-sleep/feed</wfw:commentRss>
		<slash:comments>261</slash:comments>
		</item>
		<item>
		<title>How to Save Voicemail Forever on Your Mac</title>
		<link>http://richardkmiller.com/391/how-to-save-voicemail-forever-on-your-mac</link>
		<comments>http://richardkmiller.com/391/how-to-save-voicemail-forever-on-your-mac#comments</comments>
		<pubDate>Sun, 18 Jan 2009 07:18:45 +0000</pubDate>
		<dc:creator>Richard K Miller</dc:creator>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Audacity]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Phone]]></category>
		<category><![CDATA[Skype]]></category>
		<category><![CDATA[Soundflower]]></category>
		<category><![CDATA[Soundflowerbed]]></category>
		<category><![CDATA[Voicemail]]></category>

		<guid isPermaLink="false">http://richardkmiller.com/?p=391</guid>
		<description><![CDATA[With a combo of free Mac applications, you can record and save voicemails from your mobile phone. You&#8217;ll need to install the following Mac applications: Skype. You&#8217;ll use Skype to make a call to your mobile phone and listen to &#8230; <a href="http://richardkmiller.com/391/how-to-save-voicemail-forever-on-your-mac">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class='microid-f6e7a91602a9e692ffade1b0d74d8061bab8145e'><p>With a combo of free Mac applications, you can record and save voicemails from your mobile phone.</p>
<p>You&#8217;ll need to install the following Mac applications:</p>
<p><img src="http://richardkmiller.com/wp-content/uploads/2009/01/skype.png" alt="skype" title="skype" width="48" height="48" class="alignleft size-full wp-image-408" /> <a href="http://skype.com/">Skype</a>. You&#8217;ll use Skype to make a call to your mobile phone and listen to your voicemail. Though the app is free, you&#8217;ll need to buy Skype Credit to make a &#8220;Skype Out&#8221; call to your mobile phone.</p>
<div style="clear:both;">&nbsp;</div>
<p><img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity.png" alt="audacity" title="audacity" width="48" height="48" class="alignleft size-full wp-image-407" /> <a href="http://audacity.sourceforge.net/">Audacity</a>. You&#8217;ll use this free application to record your phone call.</p>
<div style="clear:both;">&nbsp;</div>
<p><img src="http://richardkmiller.com/wp-content/uploads/2009/01/soundflowerbed.png" alt="soundflowerbed" title="soundflowerbed" width="48" height="48" class="alignleft size-full wp-image-409" /> <a href="http://www.cycling74.com/products/soundflower">Soundflower and Soundflowerbed</a>. This free system extension will connect Skype to Audacity. It&#8217;s like a laundry chute for audio; you can direct audio from any application to another. It does this by adding a pseudo &#8220;device&#8221; to your list of audio devices in System Preferences.</p>
<h3>Instructions:</h3>
<ol>
<li>Open Audacity, then Audacity Preferences. In the Audio I/O section, change the <strong>Recording device</strong> to <strong>Core Audio: Soundflower (2ch)</strong>. <img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity_preferences.png" alt="audacity_preferences" title="audacity_preferences" width="403" height="140" class="size-full wp-image-399" /></li>
<li>Open Skype, then Skype Preferences. Under the Audio tab, change <strong>Audio Output</strong> to <strong>Soundflower (2ch)</strong>. <br /> <img src="http://richardkmiller.com/wp-content/uploads/2009/01/skype_preferences.png" alt="skype_preferences" title="skype_preferences" width="439" height="133" class="size-full wp-image-402" /></li>
<li>Open Soundflowerbed in your menu bar, then under <strong>Soundflower (2ch)</strong>, select <strong>Built-in Output</strong>. Soundflowerbed allows you to monitor the audio passing through Soundflower, like having a window into the laundry shoot to watch clothes that fall past. <br /> <img src="http://richardkmiller.com/wp-content/uploads/2009/01/soundflower_preferences.png" alt="soundflower_preferences" title="soundflower_preferences" width="278" height="122" class="size-full wp-image-404" /></li>
<li>Back in Audacity, click the <strong>Record</strong> button to begin recording.
<p> <img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity_record_button.png" alt="audacity_record_button" title="audacity_record_button" width="151" height="76" class="size-full wp-image-400" /></li>
<li>In Skype, make a call to your cell phone. When your greeting begins playing, press the sequence of keys that accesses your voicemail (probably the asterisk key followed by your password.) Listen to your voicemail as you normally would. Then hang up. <img src="http://richardkmiller.com/wp-content/uploads/2009/01/skype_phonecall.png" alt="skype_phonecall" title="skype_phonecall" width="350" height="342" class="size-full wp-image-435" /></li>
<li>Switch back to Audacity and click the <strong>Stop</strong> button. You should see the zig-zaggy waveform of the message you just recorded.<br /> <img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity_stop_button.png" alt="audacity_stop_button" title="audacity_stop_button" width="115" height="71" class="size-full wp-image-433" /> <br /> <img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity_waveform.png" alt="audacity_waveform" title="audacity_waveform" width="306" height="143" class="size-full wp-image-434" /></li>
<li>Click the Audacity cursor directly before your message. (You can find out where this is by using the <strong>Play</strong> and <strong>Stop</strong> buttons.) From the Edit menu, choose <strong>Select</strong> then <strong>Track Start to Cursor</strong>. Push the <strong>Delete</strong> key on your keyboard. This will remove extraneous audio before your message. <img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity_before.png" alt="audacity_before" title="audacity_before" width="476" height="182" class="size-full wp-image-431" /></li>
<li>Click the Audacity cursor directly after your message. From the Edit menu, choose <strong>Select</strong> then <strong>Cursor to Track End</strong>. Push the <strong>Delete</strong> key. This will remove extraneous audio after your message. <img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity_after.png" alt="audacity_after" title="audacity_after" width="487" height="182" class="size-full wp-image-430" /></li>
<li>Choose <strong>Export</strong> from the File menu and save your voicemail. You can email it to a friend or save it in iTunes. <img src="http://richardkmiller.com/wp-content/uploads/2009/01/audacity_export.png" alt="audacity_export" title="audacity_export" width="556" height="204" class="size-full wp-image-432" /></li>
</ol>
</div>]]></content:encoded>
			<wfw:commentRss>http://richardkmiller.com/391/how-to-save-voicemail-forever-on-your-mac/feed</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
	</channel>
</rss>

