<?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; Guides</title>
	<atom:link href="http://magp.ie/category/guides/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; Guides</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>Uninstall and Remove Xcode Completely</title>
		<link>http://magp.ie/2011/12/12/uninstall-and-remove-xcode-completely/</link>
		<comments>http://magp.ie/2011/12/12/uninstall-and-remove-xcode-completely/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 17:12:53 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[xcode]]></category>
		<category><![CDATA[uninstall]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[max osx]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=688</guid>
		<description><![CDATA[If you are in a position where you want to remove the colossus that is Xcode, here is the terminal command to use. sudo /Developer/Library/uninstall-devtools –mode=all In my case, I was using migration assistant to migrate my applications and user &#8230; <a href="http://magp.ie/2011/12/12/uninstall-and-remove-xcode-completely/">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=688&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are in a position where you want to remove the colossus that is Xcode, here is the terminal command to use.</p>
<p><code>sudo /Developer/Library/uninstall-devtools –mode=all</code></p>
<p>In my case, I was using <a href="http://support.apple.com/kb/HT4413" title="Super Time Saver!" target="_blank">migration assistant</a> to migrate my applications and user account to a new laptop. My older laptop had an older version of Xcode that I didn&#8217;t want included in the migration and as it is so big, I didn&#8217;t want to take the chance.</p>
<p><a href="http://pushkararora.com/how-to/how-to-uninstall-xcode-completely/" title="Thanks!" target="_blank">Kudos to Pushkararora.com</a></p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/bash/'>bash</a>, <a href='http://magp.ie/tag/max-osx/'>max osx</a>, <a href='http://magp.ie/tag/remove/'>remove</a>, <a href='http://magp.ie/tag/terminal/'>terminal</a>, <a href='http://magp.ie/tag/uninstall/'>uninstall</a>, <a href='http://magp.ie/tag/xcode/'>xcode</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/688/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/688/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/688/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=688&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2011/12/12/uninstall-and-remove-xcode-completely/feed/</wfw:commentRss>
		<slash:comments>0</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>HTML5 Data attributes in HTML and jQuery</title>
		<link>http://magp.ie/2011/11/29/html5-data-attributes-in-html-and-jquery/</link>
		<comments>http://magp.ie/2011/11/29/html5-data-attributes-in-html-and-jquery/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 18:18:41 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[data attribute]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json_encode]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=667</guid>
		<description><![CDATA[When writing javascript, it is often necessary to include metadata in the HTML markup, to help define some element or behaviour. There are common options available. You can use hidden inputs and/or standard attributes like class or title to store &#8230; <a href="http://magp.ie/2011/11/29/html5-data-attributes-in-html-and-jquery/">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=667&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When writing javascript, it is often necessary to include metadata in the HTML markup, to help define some element or behaviour. There are common options available. You can use hidden inputs and/or standard attributes like <code>class</code> or <code>title</code> to store this metadata. However with HTML5&#8242;s data attribute, storing and parsing this data has become a whole lot easier and cleaner.</p>
<p>The syntax is straightforward. Any attribute prefixed with <code>data-</code> will be treated as data storage.</p>
<p><pre class="brush: xml;">&lt;div class=&quot;test&quot; data-foo=&quot;bar&quot;&gt;&lt;/div&gt;</pre></p>
<p>jQuery accesses this data like so&#8230;<br />
<pre class="brush: jscript;">var data = $( 'div.test' ).data( 'foo' ); // returns bar</pre></p>
<p>Support for the data attribute has been added since jQuery <a href="http://blog.jquery.com/2010/10/16/jquery-143-released/" title="version 1.4.3" target="_blank">version 1.4.3</a>. jQuery&#8217;s implementation is smart enough that it can parse the attribute easily and even determine the correct data type used.</p>
<p>What I have found really useful is the fact that the jQuery can parse JSON syntax and return a JSON object. This makes passing data in PHP trivial, using the <a href="http://php.net/manual/en/function.json-encode.php" title="json_encode" target="_blank">json_encode</a> method. We also need to use <a href="http://php.net/manual/en/function.htmlspecialchars.php" title="Escape quotes" target="_blank">htmlspecialchars</a> method to escape or convert any quotes in the JSON string.<br />
<pre class="brush: php;">
&lt;?php  
$test = array( 'row' =&gt; 1, 'col' =&gt; 6, 'color' =&gt; 'pink' ); //create array of data you want to pass to jquery
$test = json_encode( $test ); //convert array to a JSON string
$test = htmlspecialchars( $test, ENT_QUOTES ); //convert any quotes into HTML entities so JSON string behaves as a proper HTML attribute.
?&gt;
&lt;div class=&quot;test&quot; data-complex=&quot;&lt;?php echo $test ; ?&gt;&quot;&gt;&lt;/div&gt;</pre></p>
<p>The jQuery parses the JSON string like so&#8230;<br />
<pre class="brush: jscript;">var test = $( 'div.test' ).data( 'complex' ); // returns JSON Object

console.log( test.color ); // outputs pink!</pre></p>
<p>Important to note that this method is also backward compatible with older browsers, so there is no excuse not to give it a go!</p>
<br />Filed under: <a href='http://magp.ie/category/code/'>Code</a>, <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/data-attribute/'>data attribute</a>, <a href='http://magp.ie/tag/html5/'>html5</a>, <a href='http://magp.ie/tag/jquery/'>jQuery</a>, <a href='http://magp.ie/tag/json/'>json</a>, <a href='http://magp.ie/tag/json_encode/'>json_encode</a>, <a href='http://magp.ie/tag/php/'>php</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/667/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=667&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2011/11/29/html5-data-attributes-in-html-and-jquery/feed/</wfw:commentRss>
		<slash:comments>2</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>iWorks 09 DVD installation problems</title>
		<link>http://magp.ie/2011/10/18/iworks-09-dvd-installation-problems/</link>
		<comments>http://magp.ie/2011/10/18/iworks-09-dvd-installation-problems/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 18:14:20 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[iWorks]]></category>
		<category><![CDATA[installation]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=658</guid>
		<description><![CDATA[I&#8217;m pretty sure this will help nobody and it&#8217;s unlikely I will have the same problem again but just in case&#8230; If you are having difficulty installing iWorks 09 from the DVD, then this is what I went through to &#8230; <a href="http://magp.ie/2011/10/18/iworks-09-dvd-installation-problems/">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=658&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pretty sure this will help nobody and it&#8217;s unlikely I will have the same problem again but just in case&#8230;</p>
<p>If you are having difficulty installing iWorks 09 from the DVD, then this is what I went through to finally get it to work.<br />
<span id="more-658"></span></p>
<ul>
<li>Bought iWorks 09 from the Apple store, and they sent the software on a DVD <em>(how retro!)</em>.</li>
<li>Tried to install the software, but each time I was asked for a serial number or to install from the DVD.</li>
<li>No serial number could be found on box, inside box, on disc etc. Confusion reigned.</li>
<li>Figured as a trial version of iWorks was installed that perhaps my Mac was also confused.</li>
<li>Removed the application from the <code>Applications</code> directory and removed any iWorks cache files from <code>Library/Caches</code> directory.</li>
<li>Reinstalled and this time it <strong>crashed</strong> when loading&#8230; sigh.</li>
<li>After a long search, I found a full list of what I need to delete to make sure no trace of iWorks exist <em>(below)</em>.</li>
<li>Restarted Mac, reinstalled and registered, I&#8217;m now good to go.</li>
</ul>
<p><code>/Macintosh HD/Applications/iWork '09 (folder)<br />
/Macintosh HD/Library/Receipts/iWork09* (any file in this folder that refers to iWork)<br />
/Macintosh HD/Library/Preferences/com.apple.iWork09.plist<br />
/Macintosh HD/Library/Preferences/com.apple.iWork09.Installer.plist<br />
/Macintosh HD/Library/Application Support/iWork '09 (folder)<br />
/Macintosh HD/Library/Application Support/iWork (folder--if present)<br />
/username/Library/Application Support/iWork (folder)<br />
/username/Library/Preferences/ByHost/com.apple.iWork.Pages.NUMBER.plist<br />
/username/Library/Preferences/ByHost/com.apple.iWork.Keynote.NUMBER.plist<br />
/username/Library/Preferences/ByHost/com.apple.iWork.Numbers.NUMBER.plist<br />
/username/Library/Preferences/ByHost/com.apple.iWork.NUMBER.plist<br />
/username/Library/Preferences/com.apple.iWork.Pages.plist<br />
/username/Library/Preferences/com.apple.iWork.Keynote.plist<br />
/username/Library/Preferences/com.apple.iWork.Numbers.plist<br />
/username/Library/Preferences/com.apple.iWork.plist</code></p>
<p>[<strong>NOTE</strong>:: Not sure if it's relevant, but I used <a href="http://www.mactricksandtips.com/2008/07/easily-delete-files-using-terminal.html" title="Delete files with terminal" target="_blank">terminal to delete these files</a> as I didn't trust Mac Finder at this stage!]</p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/installation/'>installation</a>, <a href='http://magp.ie/tag/iworks/'>iWorks</a>, <a href='http://magp.ie/tag/mac-osx/'>Mac OSX</a>, <a href='http://magp.ie/tag/software/'>software</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/658/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/658/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/658/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=658&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2011/10/18/iworks-09-dvd-installation-problems/feed/</wfw:commentRss>
		<slash:comments>0</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>Mac mail not sending Gmail email</title>
		<link>http://magp.ie/2011/08/10/mac-mail-not-sending-gmail-email/</link>
		<comments>http://magp.ie/2011/08/10/mac-mail-not-sending-gmail-email/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 09:49:24 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[connection doctor]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[mac mail]]></category>
		<category><![CDATA[outgoing server]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=613</guid>
		<description><![CDATA[Infrequently my Mac mail would be rendered incapable of sending email. It appears the Mac mail client could not connect to the outgoing Gmail SMTP server, smtp.gmail.com, then after a few hours the connection would be restored automatically. I assumed &#8230; <a href="http://magp.ie/2011/08/10/mac-mail-not-sending-gmail-email/">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=613&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Infrequently my Mac mail would be rendered incapable of sending email.</p>
<p>It appears the Mac mail client could not connect to the outgoing Gmail SMTP server, <code>smtp.gmail.com</code>, then after a few hours the connection would be restored automatically.</p>
<p>I <em>assumed</em> that my settings must be fine as they remained constant, it <em>must</em> be a problem on the Gmail servers end, but it was happening too often for that to be plausible.</p>
<p><span id="more-613"></span></p>
<p>So I used the <a title="Connection Doctor" href="http://docs.info.apple.com/article.html?path=Mail/2.0/en/ml1098.html" target="_blank">connection doctor</a> to see what was happening under the hood.</p>
<p>To access the connection doctor, go to the <code>Windows-&gt;Connection Doctor</code> option in your Mac mail menu.</p>
<p>First thing I noticed was that I was trying to connect to a bunch of different outgoing servers. This is because I had set up separate email accounts (another Gmail and Yahoo mail account). It couldn&#8217;t connect to any of them, which was suspicious in itself.</p>
<p>Slash and burn time. <a title="Remove SMTP servers" href="http://email.about.com/od/macosxmailtips/qt/How_to_Delete_an_Outgoing_Mail_Server_in_Mac_OS_X_Mail.htm" target="_blank">I edited my SMTP servers list and I removed the 2 other outgoing servers</a> that I never used, leaving me the one server that I always tried to use.</p>
<p>I ran the connection doctor again and watched the output window.</p>
<p>Failed to connect again, bummer. But I noticed it was using port 25 when trying to connect. That&#8217;s not right I thought, it should use port 465 if it&#8217;s using SSL. <a title="Gmail server settings" href="https://mail.google.com/support/bin/answer.py?hl=en&amp;answer=13287" target="_blank">Gmail expects you to use SSL, when connecting and to use port 465</a>.</p>
<p>So I edited the remaining outgoing server connection settings by doing the following.</p>
<ul>
<li>Went back to editing SMTP list (described above)</li>
<li>Clicked on remaining server</li>
<li>Clicked on Advanced Tab</li>
</ul>
<p>Instead of choosing &#8216;<strong>Use default posts</strong>&#8216;, I specified a custom port <strong>465</strong> and made sure the &#8216;<strong>Use Secure Sockets Layer (SSL)</strong>&#8216; checkbox was checked.</p>
<p>Saved settings.</p>
<p><img class="alignnone" title="edit advanced outgoing server settings" src="https://img.skitch.com/20110729-kgj2ex4j7j3hwinry4ppcbssq9.jpg" alt="edit advanced outgoing server settings" width="388" height="206" /></p>
<p>Returned to connection doctor. This time I again failed to connect (boo!) but I got a different error (yay!). Authentication failed. Huh? I didn&#8217;t change anything, how did that happen&#8230; <em>hmm</em>.</p>
<p>Now I returned to edit the remaining outgoing server. Made sure the Password option was set and I re-entered my account username &amp; password.</p>
<p>Saved settings again.</p>
<p>At this point, I was a little exasperated so I also tried unlocking my Gmail account. I was aware that Gmail lock accounts if they detect unusual behavior, so I made sure my Gmail account was unlocked by going to <a title="Unlock Gmail Account" href="https://www.google.com/accounts/UnlockCaptcha" target="_blank">https://www.google.com/accounts/UnlockCaptcha</a>.</p>
<p>Tried the connection doctor again and sweet baby zeus it connected.</p>
<p>Unfortunately, I cannot say for certain what was the issue. I had tried unlocking the account before I started this and it didn&#8217;t connect, so it wasn&#8217;t just that.</p>
<p>Anyway, thought I&#8217;d post what I tried, might help someone&#8230; might also waste 10 minutes of some punter&#8217;s life!</p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/connection-doctor/'>connection doctor</a>, <a href='http://magp.ie/tag/gmail/'>Gmail</a>, <a href='http://magp.ie/tag/imap/'>IMAP</a>, <a href='http://magp.ie/tag/mac-mail/'>mac mail</a>, <a href='http://magp.ie/tag/outgoing-server/'>outgoing server</a>, <a href='http://magp.ie/tag/smtp/'>SMTP</a>, <a href='http://magp.ie/tag/ssl/'>SSL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/613/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=613&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2011/08/10/mac-mail-not-sending-gmail-email/feed/</wfw:commentRss>
		<slash:comments>0</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>

		<media:content url="https://img.skitch.com/20110729-kgj2ex4j7j3hwinry4ppcbssq9.jpg" medium="image">
			<media:title type="html">edit advanced outgoing server settings</media:title>
		</media:content>
	</item>
		<item>
		<title>Find process using port number in Bash</title>
		<link>http://magp.ie/2011/04/19/find-process-using-port-number-in-bash/</link>
		<comments>http://magp.ie/2011/04/19/find-process-using-port-number-in-bash/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 08:37:03 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[killall]]></category>
		<category><![CDATA[lsof command]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=575</guid>
		<description><![CDATA[Something that has bugged me recently is that when I go to proxy on a particular port, the port is already in use and I get the following error. bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 8090 &#8230; <a href="http://magp.ie/2011/04/19/find-process-using-port-number-in-bash/">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=575&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Something that has bugged me recently is that when I go to proxy on a particular port, the port is already in use and I get the following error.<br />
<code><br />
bind: Address already in use<br />
channel_setup_fwd_listener: cannot listen to port: 8090<br />
Could not request local forwarding.<br />
</code><br />
<span id="more-575"></span><br />
So I had a quick look to find out how to locate the process hogging the port. All I need to do is use the <a href="http://www.catonmat.net/blog/unix-utilities-lsof/" target="_blank">lsof command</a>.</p>
<p><code>lsof -i:8090</code></p>
<p>This command returns a list of open processes on this port.</p>
<p>Something like&#8230;<br />
<code><br />
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME<br />
ssh 75782 eoin 5u IPv6 0x01c1c234 0t0 TCP localhost:8090 (LISTEN)<br />
</code></p>
<p>To free the port, kill the process using it&#8230;<br />
<code>kill 75782</code></p>
<p>&nbsp;</p>
<p>[<strong>Update</strong>: Simpler solution found]</p>
<p>Easier to kill all ssh processes and restart them (if you use <a title="Terminal Aliases" href="http://magp.ie/2010/02/11/terminal-aliases/" target="_blank">terminal aliases</a>!), since in my case it is always an ssh process that is hogging the port.<br />
<code></code></p>
<p><code>killall ssh</code></p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/bash/'>bash</a>, <a href='http://magp.ie/tag/killall/'>killall</a>, <a href='http://magp.ie/tag/lsof-command/'>lsof command</a>, <a href='http://magp.ie/tag/terminal/'>terminal</a>, <a href='http://magp.ie/tag/unix/'>Unix</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/575/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=575&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2011/04/19/find-process-using-port-number-in-bash/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>Debugging PHP by monitoring errors in terminal</title>
		<link>http://magp.ie/2011/03/10/debugging-php-by-monitoring-errors-in-terminal/</link>
		<comments>http://magp.ie/2011/03/10/debugging-php-by-monitoring-errors-in-terminal/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 20:27:00 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[debugging techniques]]></category>
		<category><![CDATA[debug_backtrace]]></category>
		<category><![CDATA[error_log]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=531</guid>
		<description><![CDATA[This is a super simple command but there is something about the following sequence of characters that I simply cannot retain in my brain. tail -f /tmp/php-errors This is a handy command to debug your PHP on your server where &#8230; <a href="http://magp.ie/2011/03/10/debugging-php-by-monitoring-errors-in-terminal/">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=531&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a super simple command but there is something about the following sequence of characters that I simply cannot retain in my brain.<br />
<span id="more-531"></span><br />
<code>tail -f /tmp/php-errors</code></p>
<p>This is a handy command to debug your PHP on your server where you may have errors hidden. </p>
<ul>
<li>The <a href="http://ss64.com/bash/tail.html">tail</a> command shows the end of a file.</li>
<li>The -f flag tells it to keep the file open, while you debug your code</li>
<li>The /tmp/php-error is ( I assume! ) a temporary error log file that stores PHP errors on the server.</li>
<p>.</ul>
<p><strong>Update:</strong></p>
<p>If you use <code>error_log(print_r(debug_backtrace(), true ))</code> with this command, you can monitor the call stack in real time. Super useful when debugging!</p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/bash/'>bash</a>, <a href='http://magp.ie/tag/command/'>command</a>, <a href='http://magp.ie/tag/debugging-techniques/'>debugging techniques</a>, <a href='http://magp.ie/tag/debug_backtrace/'>debug_backtrace</a>, <a href='http://magp.ie/tag/error_log/'>error_log</a>, <a href='http://magp.ie/tag/php/'>php</a>, <a href='http://magp.ie/tag/terminal/'>terminal</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/531/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=531&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2011/03/10/debugging-php-by-monitoring-errors-in-terminal/feed/</wfw:commentRss>
		<slash:comments>4</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>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>Using Terminal Screen Command</title>
		<link>http://magp.ie/2010/10/22/using-terminal-screen-command/</link>
		<comments>http://magp.ie/2010/10/22/using-terminal-screen-command/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 21:09:43 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=284</guid>
		<description><![CDATA[This is a simple one. For some reason, every time I use the screen command in terminal, I forget the commands. There are probably lots of cool reasons to use screen but I use it to run a script over &#8230; <a href="http://magp.ie/2010/10/22/using-terminal-screen-command/">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=284&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a simple one. For some reason, every time I use the <a href="http://ss64.com/bash/screen.html">screen command</a> in terminal, I forget the commands.</p>
<p>There are probably lots of cool reasons to use screen but I use it to run a script over a longish period. The advantage of screen is I can start the script in the screen instance and detach from it. I can close my laptop and return later to my terminal, open my screen and check the progress of the script. Also, you can run multiple instances of a script as each screen has its own process.</p>
<p>So the basic commands I use and tend to forget are&#8230;<span id="more-284"></span></p>
<p>Create a screen with a label so you know what it&#8217;s for: <code>screen -S 'run-long-script1'</code></p>
<p>Detach from the screen: <code>Ctrl + a + d</code></p>
<p>Kill the screen: <code>exit</code></p>
<p>Check what screens you have created: <code>screen -ls</code></p>
<p>Open a screen that you have already created: <code>screen -r 'run-long-script1'</code></p>
<p>Access the extensive screen manual: <code>man screen</code></p>
<p>Found this guide helpful from <a href="http://www.thegeekstuff.com/2010/07/screen-command-examples/">thegeekstuff</a>.</p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/bash/'>bash</a>, <a href='http://magp.ie/tag/commands/'>commands</a>, <a href='http://magp.ie/tag/screen/'>screen</a>, <a href='http://magp.ie/tag/terminal/'>terminal</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/284/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=284&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2010/10/22/using-terminal-screen-command/feed/</wfw:commentRss>
		<slash:comments>0</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>Javascript library to manage Flash Local Stored Objects</title>
		<link>http://magp.ie/2010/10/15/javascript-library-to-manage-flash-local-stored-objects/</link>
		<comments>http://magp.ie/2010/10/15/javascript-library-to-manage-flash-local-stored-objects/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 18:40:25 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[cross-browser]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[LSO]]></category>
		<category><![CDATA[same origin policy]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=236</guid>
		<description><![CDATA[In an earlier post, I explained how to use Javascript to talk to a Flash file to create and read Local stored objects, a.k.a. Flash cookies. The only hitch I met was that I couldn&#8217;t create cross domain cookies this &#8230; <a href="http://magp.ie/2010/10/15/javascript-library-to-manage-flash-local-stored-objects/">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=236&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In an <a href="http://magp.ie/2010/03/22/javascript-externalinterface-flash-and-local-shared-objects/">earlier post</a>, I explained how to use Javascript to talk to a Flash file to create and read Local stored objects, a.k.a. Flash cookies.</p>
<p>The only hitch I met was that I couldn&#8217;t create cross domain cookies this way as I was hitting the <a href="http://www.w3.org/Security/wiki/Same_Origin_Policy">same domain policy</a>. However as pointed out in the comments, it is possible, and simple too&#8230; I just needed to add&#8230;<span id="more-236"></span></p>
<p><code>Security.allowDomain("*");</code></p>
<p>Well, as I was editing my simple library, I came across a gem of a Javascript library that is better written and was <a href="http://github.com/nfriedly/Javascript-Flash-Cookies">open sourced</a>.<br />
The library can be found on the site, <a href="http://nfriedly.com/techblog/2010/07/swf-for-javascript-cross-domain-flash-cookies/">nfriedly.com</a>.</p>
<p>Couple of points, you should probably use some flash detection when working with this as it uses Actionscript 3.0. This is only available from Flash version 9.0.31. I used <a href="http://www.featureblend.com/javascript-flash-detection-library.html">featureblend.com</a>&#8216;s most excellent <a href="http://www.featureblend.com/flash_detect_1-0-4/flash_detect_min.js">compressed Javascript library</a>.</p>
<p>Depending on your usage of the library, you may need to edit the Javascript to fix a couple of bugs. The library uses document.body.appendChild() which when used while dynamically loading the library, will <a href="http://support.microsoft.com/kb/927917">cause Internet Explorer 7 to calf.</a></p>
<p>Simple fix is to either use document.write to insert a div into the dom and use this element or use an existing one to append to.</p>
<p>Also found while using dynamic loading, that if there is a timeout caused (from not being able to connect to the Flash file) and the SwfStore object is not initialized, it will throw an error as it tries to access the SwfStore methods. </p>
<p>Another simple fix is to add a check that it is defined&#8230; </p>
<p><pre class="brush: plain;">this._timeout = setTimeout(function () {
            if ( typeof SwfStore!==&quot;undefined&quot; &amp;&amp; typeof SwfStore[namespace]!==&quot;undefined&quot; ) {
            	SwfStore[namespace].log('Timeout reached, assuming the store.swf failed to load and firing the onerror callback.');
            	if ( typeof SwfStore[namespace].config.onerror !== &quot;undefined&quot; ){
            		SwfStore[namespace].config.onerror();
            	}
            }
        }, timeout * 1000);</pre></p>
<p>Anyways, love coming across libraries like this as it saves me a bunch of time. Check it out, it&#8217;s almost certainly what you need <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/cookies/'>cookies</a>, <a href='http://magp.ie/tag/cross-browser/'>cross-browser</a>, <a href='http://magp.ie/tag/externalinterface/'>ExternalInterface</a>, <a href='http://magp.ie/tag/flash/'>Flash</a>, <a href='http://magp.ie/tag/javascript/'>javascript</a>, <a href='http://magp.ie/tag/lso/'>LSO</a>, <a href='http://magp.ie/tag/same-origin-policy/'>same origin policy</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/236/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=236&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2010/10/15/javascript-library-to-manage-flash-local-stored-objects/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>Edit your Host File on Mac or Windows</title>
		<link>http://magp.ie/2010/09/28/edit-host-file-mac-windows/</link>
		<comments>http://magp.ie/2010/09/28/edit-host-file-mac-windows/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 20:48:15 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[flush DNS]]></category>
		<category><![CDATA[Hosts file]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://magp.ie/?p=216</guid>
		<description><![CDATA[Here is a short one to get me blogging again. The hosts file is a plain text file that the operating system uses to link host names to IP addresses. When you are developing in a sandbox environment, you can &#8230; <a href="http://magp.ie/2010/09/28/edit-host-file-mac-windows/">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=216&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is a short one to get me blogging again.</p>
<p>The hosts file is a plain text file that the operating system uses to link host names to IP addresses. When you are developing in a sandbox environment, you can place host names in this file to direct your browser to the IP address of your sandbox. <span id="more-216"></span></p>
<p>On your <a target="_blank" href="http://support.apple.com/kb/TA27291?viewlocale=en_US">Mac OSX (10.2 or later)</a>, you can find your host file by typing&#8230;<br />
<code>sudo nano /private/etc/hosts</code></p>
<p>You will then need to enter your IP address and hostname&#8230;<br />
<code>192.168.0.1    www.magp.ie</code></p>
<p>Save the hosts file and flush the DNS.<br />
<code>dscacheutil -flushcache</code></p>
<p><strong>Handy Tip:</strong> You can make <a href="http://magp.ie/2010/02/11/terminal-aliases/">aliases</a> to save you remembering those commands, like so&#8230;<br />
<code>alias hosts='sudo nano /private/etc/hosts'<br />
alias flushdns='dscacheutil -flushcache'</code></p>
<p>On a <a target="_blank" href="http://vlaurie.com/computers2/Articles/hosts.htm">Windows box</a>, you can find the hosts file at the path;<br />
<em><strong>%systemroot%\system32\drivers\etc\hosts</strong></em></p>
<p>Again you simply enter the IP address and host name you are using and save.<br />
On Windows 7 and probably Vista (never had the pleasure), you will need to be an administrator to save any changes to this file. To get round this, you can simply right click on the file and change the file permissions to allow anyone to edit it (which is what I did) or you can open notepad as an administrator before opening the hosts file.</p>
<p>Not sure its necessary but to <a target="_blank" href="http://www.winvistaclub.com/t143.html">flush</a> the windows DNS, you open a command prompt and type&#8230;<br />
<code>ipconfig /flushdns</code><br />
If you are on a Windows 7/vista box, you may need to open the command prompt as an administrator.</p>
<p>By the way, to open an application on Windows as an administrator, you right click on the application and select the &#8216;Run as Administrator&#8217;.</p>
<br />Filed under: <a href='http://magp.ie/category/guides/'>Guides</a> Tagged: <a href='http://magp.ie/tag/flush-dns/'>flush DNS</a>, <a href='http://magp.ie/tag/hosts-file/'>Hosts file</a>, <a href='http://magp.ie/tag/mac-osx/'>Mac OSX</a>, <a href='http://magp.ie/tag/windows/'>windows</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/blogalhost.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/blogalhost.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/blogalhost.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/blogalhost.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/blogalhost.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/blogalhost.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/blogalhost.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/blogalhost.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/blogalhost.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/blogalhost.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/blogalhost.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/blogalhost.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/blogalhost.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/blogalhost.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magp.ie&amp;blog=11708208&amp;post=216&amp;subd=blogalhost&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magp.ie/2010/09/28/edit-host-file-mac-windows/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>
