<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Leons Tech Blog</title>
	
	<link>http://lpetr.org/blog</link>
	<description>Musings about technology</description>
	<lastBuildDate>Mon, 13 May 2013 14:57:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/leotech" /><feedburner:info uri="leotech" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>leotech</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fleotech" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/leotech" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fleotech" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fleotech" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><item>
		<title>Have bash warn you about uninitialized variables with set -u</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/GqKQH9iwW90/have-bash-warn-you-about-uninitialized-variables-with-set-u</link>
		<comments>http://lpetr.org/blog/archives/have-bash-warn-you-about-uninitialized-variables-with-set-u#comments</comments>
		<pubDate>Mon, 13 May 2013 14:57:13 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=904</guid>
		<description><![CDATA[By default, Bash treats uninitialized variables the same way as Perl &#8212; they are blank strings. If you want them treated more like Python, you can issue the following command in your bash script: [crayon-519e573071cef/] You will then start seeing warning messages like the following: [crayon-519e573072cb2/] Note that this mean you can&#8217;t check for the [...]]]></description>
				<content:encoded><![CDATA[<p>By default, Bash treats uninitialized variables the same way as Perl &#8212; they are blank strings. If you want them treated more like Python, you can issue the following command in your bash script:</p><pre class="crayon-plain-tag">set -u</pre><p>You will then start seeing warning messages like the following:</p><pre class="crayon-plain-tag">./my_script.sh: line 419: FOO_BAR: unbound variable</pre><p>Note that this mean you can&#8217;t check for the non-existence of environment variables with a simple [[ -z "$ENVIRONMENT_VARIABLE" ]]. Instead, you could do something like the following:</p><pre class="crayon-plain-tag">[[ $( set | grep "ENVIRONMENT_VARIABLE=" | wc -l ) -lt 1 ]]</pre><p>&nbsp;</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=GqKQH9iwW90:K4RvXCVWHeM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=GqKQH9iwW90:K4RvXCVWHeM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=GqKQH9iwW90:K4RvXCVWHeM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/GqKQH9iwW90" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/have-bash-warn-you-about-uninitialized-variables-with-set-u/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/have-bash-warn-you-about-uninitialized-variables-with-set-u?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=have-bash-warn-you-about-uninitialized-variables-with-set-u</feedburner:origLink></item>
		<item>
		<title>Set PuTTY defaults, permanently</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/f8pFu4yhHxA/set-putty-defaults-permanently</link>
		<comments>http://lpetr.org/blog/archives/set-putty-defaults-permanently#comments</comments>
		<pubDate>Tue, 30 Apr 2013 14:03:32 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=895</guid>
		<description><![CDATA[PuTTY or one of its forks is a standard tool for administering Unix and Linux machines from Windows. It provides SSH connectivity for command line access, as well as keypair management for compatible programs like WinSCP. Unfortunately, PuTTY has some terrible defaults. For example, it limits itself to 200 lines of scrollback by default, which [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY </a>or one of its forks is a standard tool for administering Unix and Linux machines from Windows. It provides SSH connectivity for command line access, as well as keypair management for compatible programs like <a href="http://winscp.net/eng/index.php">WinSCP</a>.</p>
<p>Unfortunately, PuTTY has some terrible defaults. For example, it limits itself to 200 lines of scrollback by default, which guarantees that you&#8217;ll lose some history in most SSH sessions.</p>
<p>There&#8217;s a way to fix this and other defaults.</p>
<p>First, load the &#8220;Default Settings&#8221; saved session:<a href="http://lpetr.org/blog/wp-content/uploads/2013/04/1-load-default.png"><img class="aligncenter size-full wp-image-896" alt="1-load-default" src="http://lpetr.org/blog/wp-content/uploads/2013/04/1-load-default.png" width="616" height="547" /></a> Then, configure the defaults as you like. For example, I&#8217;m increasing my lines of scrollback from 200 to 20,000: <a href="http://lpetr.org/blog/wp-content/uploads/2013/04/2-configure.png"><img class="aligncenter size-full wp-image-900" alt="2-configure" src="http://lpetr.org/blog/wp-content/uploads/2013/04/2-configure.png" width="618" height="549" /></a></p>
<p>Then, save the new default settings:</p>
<p><a href="http://lpetr.org/blog/wp-content/uploads/2013/04/3-save-default.png"><img alt="3-save-default" src="http://lpetr.org/blog/wp-content/uploads/2013/04/3-save-default.png" width="618" height="549" /></a></p>
<p>PuTTY will now have a sensible defaults whenever you&#8217;re connecting to a random server.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=f8pFu4yhHxA:cbH33OpPPg0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=f8pFu4yhHxA:cbH33OpPPg0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=f8pFu4yhHxA:cbH33OpPPg0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/f8pFu4yhHxA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/set-putty-defaults-permanently/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/set-putty-defaults-permanently?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=set-putty-defaults-permanently</feedburner:origLink></item>
		<item>
		<title>Hardening WordPress against the ongoing brute-force attack</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/vyKCN7__0Vs/hardening-wordpress-against-the-ongoing-brute-force-attack</link>
		<comments>http://lpetr.org/blog/archives/hardening-wordpress-against-the-ongoing-brute-force-attack#comments</comments>
		<pubDate>Fri, 12 Apr 2013 18:57:08 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=888</guid>
		<description><![CDATA[There&#8217;s an ongoing brute-force attack against WordPress and Joomla sites. The attack tries to brute-force the admin password. (Reddit) I had to harden my WordPress some time ago. Here are the guides I followed when hardening my installation: My WordPress Site Was Hacked Hardening WordPress Ultimate Security Checker plugin (guide) Additional steps I&#8217;ve taken today: [...]]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s an <a href="http://www.melbourne.co.uk/blog/2013/04/12/brute-force-attack-on-wordpress-and-joomla-powered-sites/">ongoing brute-force attack</a> against WordPress and Joomla sites. The attack tries to brute-force the admin password. (<a href="http://www.reddit.com/r/sysadmin/comments/1c7cqg/happening_now_brute_force_attack_on_wordpress_and/">Reddit</a>)</p>
<p>I had to <a href="http://lpetr.org/blog/archives/dehacking-this-blog">harden my WordPress</a> some time ago. Here are the guides I followed when hardening my installation:</p>
<ul>
<li><a href="http://wiki.dreamhost.com/My_Wordpress_site_was_hacked">My WordPress Site Was Hacked</a></li>
<li><a href="http://codex.wordpress.org/Hardening_WordPress">Hardening WordPress</a></li>
<li>Ultimate Security Checker plugin (<a href="http://artbiz.ca/wordpress-for-artists/ultimate-security-checker/">guide</a>)</li>
</ul>
<p>Additional steps I&#8217;ve taken today:</p>
<ul>
<li>Install the <a href="http://wordpress.org/extend/plugins/limit-login-attempts/changelog/">Limit Login Attempts</a> plugin</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=vyKCN7__0Vs:MgjvqzcpIg4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=vyKCN7__0Vs:MgjvqzcpIg4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=vyKCN7__0Vs:MgjvqzcpIg4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/vyKCN7__0Vs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/hardening-wordpress-against-the-ongoing-brute-force-attack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/hardening-wordpress-against-the-ongoing-brute-force-attack?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=hardening-wordpress-against-the-ongoing-brute-force-attack</feedburner:origLink></item>
		<item>
		<title>Alternatives to Gmail?</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/ILaw6I9bQeo/alternatives-to-gmail</link>
		<comments>http://lpetr.org/blog/archives/alternatives-to-gmail#comments</comments>
		<pubDate>Tue, 26 Mar 2013 23:12:07 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Web sites]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=880</guid>
		<description><![CDATA[Now that I&#8217;ve moved from Google Reader to Fever, I&#8217;d like to reduce my reliance on other Google services. Switching from Google search to Bing is pretty easy, but I&#8217;m on much less sure ground when it comes to replacing Gmail. Requirements: Paid service (If you aren&#8217;t paying, you are the product, not the customer) [...]]]></description>
				<content:encoded><![CDATA[<p>Now that I&#8217;ve <a href="http://lpetr.org/blog/archives/migrating-from-google-reader-to-fever">moved from Google Reader to Fever</a>, I&#8217;d like to reduce my reliance on other Google services. Switching from Google search to Bing is pretty easy, but I&#8217;m on much less sure ground when it comes to replacing Gmail.</p>
<p>Requirements:</p>
<ul>
<li>Paid service (If you aren&#8217;t paying, you are the product, not the customer)</li>
<li>Search-driven interface</li>
<li>Reasonable limits on message and mailbox size</li>
</ul>
<p>I&#8217;ve heard of <a href="https://www.hushmail.com/">HushMail</a>. Is there anything else worthwhile?</p>
<p><strong>Edit:</strong> HushMail is a no-go. It doesn&#8217;t have a way to set up a filter or rule to automatically file incoming mail.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=ILaw6I9bQeo:Hv2pBimaYBo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=ILaw6I9bQeo:Hv2pBimaYBo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=ILaw6I9bQeo:Hv2pBimaYBo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/ILaw6I9bQeo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/alternatives-to-gmail/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/alternatives-to-gmail?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=alternatives-to-gmail</feedburner:origLink></item>
		<item>
		<title>Migrating from Google Reader to Fever</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/tChmeOlE-dY/migrating-from-google-reader-to-fever</link>
		<comments>http://lpetr.org/blog/archives/migrating-from-google-reader-to-fever#comments</comments>
		<pubDate>Thu, 14 Mar 2013 02:43:15 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Web applications]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=859</guid>
		<description><![CDATA[The perfidious vandals at Google will kill Google Reader on July 1, 2013. Accordingly, it is time to wean ourselves off Google dependence and find an alternative. Perhaps this will prove to be a good thing, as Google Reader has strangled RSS innovation through its monopolist, good-enough position much like IE6 once strangled the web. [...]]]></description>
				<content:encoded><![CDATA[<p>The perfidious vandals at Google <a href="http://arstechnica.com/information-technology/2013/03/google-announces-readers-imminent-demise/">will kill Google Reader</a> on July 1, 2013. Accordingly, it is time to wean ourselves off Google dependence and find an alternative. Perhaps this will prove to be a good thing, as Google Reader has strangled RSS innovation through its monopolist, good-enough position much like IE6 once strangled the web.</p>
<p><a href="http://www.newsblur.com/">NewsBlur </a>and <a href="http://theoldreader.com/">The Old Reader</a> are two services I&#8217;ve seen mentioned. Unfortunately, both are currently buckling under the load of my fellow reader-heads fleeing the sinking Google ship. (Edit: More alternatives are listed in the roundups at <a href="http://kikolani.com/google-reader-alternatives-rss-reader.html">Kikolani </a>and <a href="http://lifehacker.com/5990456/google-reader-is-getting-shut-down-here-are-the-best-alternatives">LifeHacker</a>.)</p>
<p>Accordingly, I&#8217;ve just installed <a href="http://www.feedafever.com/">Fever</a> on my shared hosting. I&#8217;m not going to recommend my hosting provider as my account is based on a grandfathered plan, but <a href="http://dreamhost.com/web-hosting/">Dreamhost </a>is popular. The more technically inclined may want to spin up an Amazon EC2 instance.</p>
<p><a href="http://www.feedafever.com/">Fever</a> is a PHP/MySQL web application. It&#8217;s <strong>very easy</strong> to install, assuming you have access to a web server. It costs a one-time $30, which is likely why it is very easy to install. It also comes with lots of really neat <a href="http://www.feedafever.com/#features">features</a> that innovate beyond what Google Reader ever did, none of which I care about.</p>
<p><strong>Migrate from Google Reader to Fever</strong></p>
<ol>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Log into </span><a style="line-height: 1.714285714; font-size: 1rem;" href="https://www.google.com/takeout/#custom:reader">Google Takeout</a><span style="line-height: 1.714285714; font-size: 1rem;">.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Download your Google Reader data.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Unzip it. The subscriptions.xml file contains your feeds and folders in standard OPML format.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Download the </span><a style="line-height: 1.714285714; font-size: 1rem;" href="http://www.feedafever.com/#account">Fever Server Compatibility Suite</a></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Upload it to your server and let it verify compatibility.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Is it compatible? Great! Paypal over the $30.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Copy the activation code from the email in your inbox into the wizard.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Let the wizard install Fever for you, importing your precious subscriptions.xml.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Fever will display a brisk progress bar as it quickly processes your myriad feeds.</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Oh, you may want to enable the unread messages count:</span></li>
</ol>
<div class="wp-caption aligncenter" style="width: 364px"><img alt="" src="http://i.imgur.com/zJCvj48.png" width="354" height="276" /><p class="wp-caption-text">Enable unread messages count</p></div>
<p>Voila!</p>
<div class="wp-caption aligncenter" style="width: 521px"><a href="http://i.imgur.com/Rrc4Gk8.png"><img alt="" src="http://i.imgur.com/Rrc4Gk8.png" width="511" height="471" /></a><p class="wp-caption-text">My fever feeds</p></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=tChmeOlE-dY:6lstGjeCQ_8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=tChmeOlE-dY:6lstGjeCQ_8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=tChmeOlE-dY:6lstGjeCQ_8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/tChmeOlE-dY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/migrating-from-google-reader-to-fever/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/migrating-from-google-reader-to-fever?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=migrating-from-google-reader-to-fever</feedburner:origLink></item>
		<item>
		<title>Fix VPN hostname resolution by flushing your DNS cache</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/9GhaHbaJpdQ/fix-vpn-hostname-resolution-by-flushing-your-dns-cache</link>
		<comments>http://lpetr.org/blog/archives/fix-vpn-hostname-resolution-by-flushing-your-dns-cache#comments</comments>
		<pubDate>Thu, 24 Jan 2013 20:15:16 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=849</guid>
		<description><![CDATA[Sometimes when my VPN connection to work goes down, certain applications that rely on intranet servers (e.g. Lotus Notes, Lotus Sametime) become unable to reconnect to their servers even after I reconnect to VPN. This is due to the operating system&#8217;s DNS lookup cache reusing the failed hostname lookup from when VPN was down rather [...]]]></description>
				<content:encoded><![CDATA[<p>Sometimes when my VPN connection to work goes down, certain applications that rely on intranet servers (e.g. Lotus Notes, Lotus Sametime) become unable to reconnect to their servers even after I reconnect to VPN. This is due to the operating system&#8217;s DNS lookup cache reusing the failed hostname lookup from when VPN was down rather than doing a fresh hostname lookup now that there is a fresh VPN connection.</p>
<p>On Windows, you can fix the issue by opening up the Command Prompt <a href="http://www.tech-recipes.com/rx/1600/vista_dns_cache_flush/">as Administrator</a> and running the following command:</p><pre class="crayon-plain-tag">ipconfig /flushdns</pre><p></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=9GhaHbaJpdQ:QcODJygVL_E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=9GhaHbaJpdQ:QcODJygVL_E:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=9GhaHbaJpdQ:QcODJygVL_E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/9GhaHbaJpdQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/fix-vpn-hostname-resolution-by-flushing-your-dns-cache/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/fix-vpn-hostname-resolution-by-flushing-your-dns-cache?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=fix-vpn-hostname-resolution-by-flushing-your-dns-cache</feedburner:origLink></item>
		<item>
		<title>mkdir -p is your friend</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/lf5oefPtuoI/mkdir-p-is-your-friend</link>
		<comments>http://lpetr.org/blog/archives/mkdir-p-is-your-friend#comments</comments>
		<pubDate>Thu, 24 Jan 2013 02:12:35 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=846</guid>
		<description><![CDATA[mkdir -p is a command second only to touch in succinct utility. touch creates a file if it does not exist, or updates its timestamp if it does. It&#8217;s handy if you want to write to a file without checking for its existence, as otherwise you&#8217;d need to determine whether or not append is the [...]]]></description>
				<content:encoded><![CDATA[<p><strong>mkdir -p</strong> is a command second only to <strong>touch</strong> in succinct utility.</p>
<p><strong>touch </strong>creates a file if it does not exist, or updates its timestamp if it does. It&#8217;s handy if you want to write to a file without checking for its existence, as otherwise you&#8217;d need to determine whether or not append is the correct mode. It&#8217;s also handy for setting flags for yourself on the filesystem.</p>
<p><strong>mkdir -p</strong> creates a path if it does not exist, or does nothing if the path already exists. mkdir -p /foo/bar/baz will create /foo, /foo/bar, and /foo/bar/baz for you. Conversely, mkdir -p /usr/local/bin will not complain because those directories already exist.</p>
<p>Why would you need this? A couple reasons that came up for me tonight:</p>
<ul>
<li>You cannot redirect output to a file if the file is in a directory that does not yet exist</li>
<li>You cannot create a symbolic link in a directory that does not yet exist</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=lf5oefPtuoI:zwM_U7w6dzU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=lf5oefPtuoI:zwM_U7w6dzU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=lf5oefPtuoI:zwM_U7w6dzU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/lf5oefPtuoI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/mkdir-p-is-your-friend/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/mkdir-p-is-your-friend?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mkdir-p-is-your-friend</feedburner:origLink></item>
		<item>
		<title>Deleting duplicates in Google Calendar</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/icipEwiYQQI/deleting-duplicates-in-google-calendar</link>
		<comments>http://lpetr.org/blog/archives/deleting-duplicates-in-google-calendar#comments</comments>
		<pubDate>Thu, 10 Jan 2013 16:19:56 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Web sites]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=836</guid>
		<description><![CDATA[I&#8217;m not sure if it was Blackberry, Android, or Facebook, but something caused all the birthday events in my Google Calendar to have 36 duplicate entries each. This not only caused visual pollution but also resulted in me getting 36 notifications on my phone for every birthday. The first two apps I tried that promised [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m not sure if it was Blackberry, Android, or Facebook, but something caused all the birthday events in my Google Calendar to have 36 duplicate entries each. This not only caused visual pollution but also resulted in me getting 36 notifications on my phone for every birthday.</p>
<p>The first two apps I tried that promised the remove duplicates didn&#8217;t, so I nearly decided to write a duplicate remover myself. However, the third app I tried &#8212; <a href="http://www.gcaltoolkit.com/">GCalToolkit </a>&#8211; worked. I used its free trial mode to purge all of the duplicates, and my calendar is clean again.</p>
<p>Incidentally, I ended up signing up for Google&#8217;s <a href="http://support.google.com/accounts/bin/topic.py?hl=en&amp;topic=28786&amp;parent=14118&amp;ctx=topic">2-step authentication</a>, as one of the non-functioning apps was password-based rather than OAuth-based. I was unwilling to give it my actual password, so I used Google&#8217;s <a href="http://support.google.com/accounts/bin/answer.py?hl=en&amp;answer=185833">application-specific passwords</a> feature which depends on 2-step authentication. I&#8217;m still somewhat apprehensive about being able to access my email should I be travelling or should I lose my phone.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=icipEwiYQQI:a04J23FMGb8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=icipEwiYQQI:a04J23FMGb8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=icipEwiYQQI:a04J23FMGb8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/icipEwiYQQI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/deleting-duplicates-in-google-calendar/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/deleting-duplicates-in-google-calendar?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=deleting-duplicates-in-google-calendar</feedburner:origLink></item>
		<item>
		<title>TurboTax 2012 crashes on startup</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/NYaywup2TW4/turbotax-2012-crashes-on-startup</link>
		<comments>http://lpetr.org/blog/archives/turbotax-2012-crashes-on-startup#comments</comments>
		<pubDate>Mon, 31 Dec 2012 04:53:06 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=833</guid>
		<description><![CDATA[I had an exciting tax year (lots of RRSPs, bought a house), so I picked up a copy of TurboTax 2012 to help file my Canada income taxes. Unfortunately, TurboTax crashed on startup and running it as Administrator did not help. It turns out there is a known workaround involving copying some DLLs around.]]></description>
				<content:encoded><![CDATA[<p>I had an exciting tax year (lots of RRSPs, bought a house), so I picked up a copy of TurboTax 2012 to help file my Canada income taxes.</p>
<p>Unfortunately, TurboTax crashed on startup and running it as Administrator did not help. It turns out there is <a href="http://support.intuit.ca/turbotax/en-ca/iq/Installation/TurboTax-2012-will-not-launch/SLN65320.html">a known workaround </a>involving copying some DLLs around.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=NYaywup2TW4:pDY2zRY53JA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=NYaywup2TW4:pDY2zRY53JA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=NYaywup2TW4:pDY2zRY53JA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/NYaywup2TW4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/turbotax-2012-crashes-on-startup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/turbotax-2012-crashes-on-startup?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=turbotax-2012-crashes-on-startup</feedburner:origLink></item>
		<item>
		<title>Startup order of services on RHEL or CentOS</title>
		<link>http://feedproxy.google.com/~r/leotech/~3/xnCPbONoeC4/startup-order-of-services-on-rhel-or-centos</link>
		<comments>http://lpetr.org/blog/archives/startup-order-of-services-on-rhel-or-centos#comments</comments>
		<pubDate>Thu, 20 Dec 2012 01:34:05 +0000</pubDate>
		<dc:creator>Leons Petrazickis</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://lpetr.org/blog/?p=827</guid>
		<description><![CDATA[The startup order of services on Red Hat Enterprise Linux (and very likely other flavours) is determined by the numerical prefix on the symbolic links in /etc/rc3.d/ (for run level 3), /etc/rc5.d/ (for run level 5), and so on. When adding a service (chkconfig &#8211;add my_service &#8211;level 35), you can specify startup order by including [...]]]></description>
				<content:encoded><![CDATA[<p>The startup order of services on Red Hat Enterprise Linux (and very likely other flavours) is determined by the numerical prefix on the symbolic links in /etc/rc3.d/ (for run level 3), /etc/rc5.d/ (for run level 5), and so on.</p>
<p>When adding a service (chkconfig &#8211;add my_service &#8211;level 35), you can specify startup order by including a chkconfig clause in the header:</p><pre class="crayon-plain-tag">#!/bin/sh
#
# chkconfig: 35 59 80</pre><p>The above service should start at run level 3 and 5 as the 59th service to run (the numbering is sparse, so there isn&#8217;t necessarily as a 58th service).</p>
<p>The 80 specifies the shut down order.</p>
<p>Obviously, do not rename the symbolic links yourself. Use chkconfig to manage them.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/leotech?a=xnCPbONoeC4:azSCJy58B8g:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/leotech?i=xnCPbONoeC4:azSCJy58B8g:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/leotech?a=xnCPbONoeC4:azSCJy58B8g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/leotech?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/leotech/~4/xnCPbONoeC4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lpetr.org/blog/archives/startup-order-of-services-on-rhel-or-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lpetr.org/blog/archives/startup-order-of-services-on-rhel-or-centos?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=startup-order-of-services-on-rhel-or-centos</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.000 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-23 12:51:44 -->
