<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Magp.ie &#187; tips</title>
	<atom:link href="http://magp.ie/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://magp.ie</link>
	<description>A nest for the random, shiny, online tidbits I stumble across...</description>
	<lastBuildDate>Tue, 31 Jan 2012 19:01:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='magp.ie' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/061e340c5da13b5a41ae8016bee03aa8?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Magp.ie &#187; tips</title>
		<link>http://magp.ie</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://magp.ie/osd.xml" title="Magp.ie" />
	<atom:link rel='hub' href='http://magp.ie/?pushpress=hub'/>
		<item>
		<title>Close a frozen SSH connection</title>
		<link>http://magp.ie/2010/11/18/close-a-frozen-ssh-connection/</link>
		<comments>http://magp.ie/2010/11/18/close-a-frozen-ssh-connection/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 10:09:28 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=410</guid>
		<description><![CDATA[Gem from the UrbanGiraffe blog. To close a frozen SSH connection, just type in the following order&#8230; Enter ~ . This bugs the hell out of me daily, so thanks John! Filed under: Guides Tagged: SSH, tips<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=410&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Gem from the <a href="http://urbangiraffe.com/2010/11/18/closing-a-frozen-ssh-session/">UrbanGiraffe blog</a>.</p>
<p>To close a frozen SSH connection, just type in the following order&#8230;<br />
<span id="more-410"></span><br />
<code>Enter<br />
~<br />
.<br />
</code></p>
<p>This bugs the hell out of me daily, so thanks John!</p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/ssh/'>SSH</a>, <a href='http://magp.ie/tag/tips/'>tips</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/410/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=410&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2010/11/18/close-a-frozen-ssh-connection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>53.734750 -8.989992</georss:point>
		<geo:lat>53.734750</geo:lat>
		<geo:long>-8.989992</geo:long>
		<media:content url="http://1.gravatar.com/avatar/72dd449e5e79e046c1c09ed8712b525a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">eoigal</media:title>
		</media:content>
	</item>
		<item>
		<title>Textwrangler Tips &#8211; Compare files, keyboard shortcuts</title>
		<link>http://magp.ie/2010/06/16/textwrangler-tips-compare-files-keyboard-shortcuts/</link>
		<comments>http://magp.ie/2010/06/16/textwrangler-tips-compare-files-keyboard-shortcuts/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 17:10:30 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[shortcuts]]></category>
		<category><![CDATA[text editor]]></category>
		<category><![CDATA[textwrangler]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=195</guid>
		<description><![CDATA[A few quick TextWrangler tips. I never knew until recently that you can compare files in TextWrangler&#8230; and its easy. Simply highlight the 2 files you want to compare in the Documents drawer, right click on them and select the &#8230; <a href="http://magp.ie/2010/06/16/textwrangler-tips-compare-files-keyboard-shortcuts/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=195&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A few quick TextWrangler tips.</p>
<p>I never knew until recently that you can compare files in <a href="http://www.barebones.com/products/textwrangler/" target="_blank">TextWrangler</a>&#8230; and its easy.</p>
<p>Simply highlight the 2 files you want to compare in the Documents drawer, right click on them and select the option &#8216;<strong>Compare Selected Documents</strong>&#8216;.</p>
<p>Now the 2 files will open into 2 windows with a review of the differences below them. You can then apply the differences in either direction.</p>
<p>Another tip is adding keyboard shortcuts to TextWrangler&#8217;s menu options.<br />
<span id="more-195"></span><br />
I like to use the <strong>Search</strong> -&rsaquo; <strong>Jump Back/Forward</strong> option to navigate around a large body of code but alas it has no keyboard shortcut. So each time you wish to move from one Jump mark to another, you need to go up to the Search menu&#8230; which kinda defeats the handiness of the option in the first place.</p>
<p>Anyways, to add a keyboard shortcut to this (or some other useful menu) option, go to <strong>Textwrangler</strong> -&rsaquo; <strong>Preferences</strong>.</p>
<p>Select <strong>Menus</strong>&#8230;</p>
<p><img class="alignnone size-full wp-image-196" title="Menus option" src="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-39-03.png?w=450" alt=""   /></p>
<p>Find the menu heading for the option you want, in my case <strong>Search</strong>&#8230;</p>
<p><img class="alignnone size-full wp-image-197" title="Search Menu header" src="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-39-38.png?w=450" alt=""   /></p>
<p>In the menu header, find the option(s) you want to add a keyboard shortcut to.</p>
<p>Highlight an option and press the <strong>Set Key</strong> button.</p>
<p><img class="alignnone size-full wp-image-198" title="Set Key button" src="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-40-42.png?w=450" alt=""   /></p>
<p>Enter the keyboard shortcut and press the <strong>Set</strong> button.</p>
<p>Bingo.</p>
<p><img class="alignnone size-full wp-image-199" title="Shortcuts" src="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-41-49.png?w=450" alt=""   /></p>
<p>Lastly, a while back <a href="http://magp.ie/2010/02/15/format-xml-with-textwrangler/" target="_blank">I wrote a shell script to format my XML</a>. To add a shortcut to this, you need to select <strong>Window</strong> -&rsaquo; <strong>Palettes</strong> -&rsaquo; <strong>Unix Filters</strong></p>
<p>Select the script you want to shortcut and press the <strong>Set Key&#8230;</strong> button. Enter your keyboard shortcut and press the <strong>Set</strong> button and now when you want to format some messy XML, you have a keyboard shortcut to knock it into shape.</p>
<br />Filed under: <a href='http://magp.ie/category/shortcuts/'>Shortcuts</a> Tagged: <a href='http://magp.ie/tag/shortcuts-2/'>shortcuts</a>, <a href='http://magp.ie/tag/text-editor/'>text editor</a>, <a href='http://magp.ie/tag/textwrangler/'>textwrangler</a>, <a href='http://magp.ie/tag/tips/'>tips</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=195&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2010/06/16/textwrangler-tips-compare-files-keyboard-shortcuts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<georss:point>53.734482 -8.990559</georss:point>
		<geo:lat>53.734482</geo:lat>
		<geo:long>-8.990559</geo:long>
		<media:content url="http://1.gravatar.com/avatar/72dd449e5e79e046c1c09ed8712b525a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">eoigal</media:title>
		</media:content>

		<media:content url="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-39-03.png" medium="image">
			<media:title type="html">Menus option</media:title>
		</media:content>

		<media:content url="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-39-38.png" medium="image">
			<media:title type="html">Search Menu header</media:title>
		</media:content>

		<media:content url="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-40-42.png" medium="image">
			<media:title type="html">Set Key button</media:title>
		</media:content>

		<media:content url="http://blogalhost.files.wordpress.com/2010/06/screen-shot-2010-06-16-at-17-41-49.png" medium="image">
			<media:title type="html">Shortcuts</media:title>
		</media:content>
	</item>
		<item>
		<title>Odd or Even Number</title>
		<link>http://magp.ie/2010/02/19/php-odd-or-even-number/</link>
		<comments>http://magp.ie/2010/02/19/php-odd-or-even-number/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 22:45:18 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=109</guid>
		<description><![CDATA[I love gems like this. I come across them from time to time but they never stick&#8230; then I do a search to find them again. Anyway a simple way to determine if a number is odd or even, use &#8230; <a href="http://magp.ie/2010/02/19/php-odd-or-even-number/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=109&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I love gems like <a href="http://www.php-scripts.com/20051104/57/" target="_blank">this</a>. I come across them from time to time but they never stick&#8230; then I do a search to find them again.</p>
<p>Anyway a simple way to determine if a number is odd or even, use the following code.</p>
<p><pre class="brush: jscript;">
function is_odd( $number ) {
    return $number &amp; 1;
}
</pre></p>
<p><strong>Quick explanation</strong><br />
<strong>&amp;</strong> is a binary <strong>AND</strong>.</p>
<p>If you have a binary value, and you <strong>AND</strong> with another binary value, then the result will be the bitwise <strong>AND</strong> of the two.</p>
<p>Binary values are a series of bits or 1&#8242;s and 0&#8242;s. However we are only concerned with the rightmost one ( the least significant bit ) as when a binary value ends with a 1, it is odd&#8230; when it ends with a 0 it is even.</p>
<p>Now, if I pass that function say the number 13, the binary value will look like <em>1101</em>.<br />
When you <strong>AND</strong> with a 1, or binary value <em>0001</em>, it looks like this&#8230;</p>
<p>1101 &amp; 0001 = 0001</p>
<p>We look to the least significant bit, which is a 1, which means the number is odd.</p>
<p>A simple explanation of binary can be found <a href="http://www.codemastershawn.com/library/tutorial/hex.bin.numbers.php" target="_blank">here</a>.</p>
<br />Filed under: <a href='http://magp.ie/category/code/'>Code</a> Tagged: <a href='http://magp.ie/tag/php/'>php</a>, <a href='http://magp.ie/tag/tips/'>tips</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=109&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2010/02/19/php-odd-or-even-number/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<georss:point>53.734750 -8.989992</georss:point>
		<geo:lat>53.734750</geo:lat>
		<geo:long>-8.989992</geo:long>
		<media:content url="http://1.gravatar.com/avatar/72dd449e5e79e046c1c09ed8712b525a?s=96&#38;d=monsterid&#38;r=PG" medium="image">
			<media:title type="html">eoigal</media:title>
		</media:content>
	</item>
	</channel>
</rss>
