<?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>Tristan Waddington</title>
	
	<link>http://www.tristanwaddington.com</link>
	<description>Web Development and Strategic Communication</description>
	<lastBuildDate>Fri, 02 Jul 2010 02:19:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</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/twaddington" /><feedburner:info uri="twaddington" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Detecting mobile devices with Javascript</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/oPiB5v1hyKc/</link>
		<comments>http://www.tristanwaddington.com/2010/06/detecting-mobile-devices-with-javascript/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 02:49:19 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=978</guid>
		<description><![CDATA[Today at work we were struggling with a way to detect the iPad and similar devices without relying on the browser user agent string.
We ended up checking the value of window.onorientationchange like so:

function is_mobile_device&#40;&#41; &#123;
    if &#40;typeof window.onorientationchange != &#34;undefined&#34;&#41; &#123;
        return true;
   [...]]]></description>
			<content:encoded><![CDATA[<p>Today at work we were struggling with a way to detect the iPad and similar devices without relying on the browser user agent string.</p>
<p>We ended up checking the value of <code>window.onorientationchange</code> like so:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> is_mobile_device<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> window.<span style="color: #660066;">onorientationchange</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;undefined&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This function will return false in all current desktop browsers because <code>typeof window.onorientationchange</code> is &#8220;undefined.&#8221; On the iPad and other mobile devices it will return a type of &#8220;object.&#8221;</p>
<p>What other ways are you using to detect mobile devices?</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/oPiB5v1hyKc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/detecting-mobile-devices-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/detecting-mobile-devices-with-javascript/</feedburner:origLink></item>
		<item>
		<title>Mount your ntfs drive on boot in Ubuntu</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/WPhPhdlvWgI/</link>
		<comments>http://www.tristanwaddington.com/2010/06/mount-your-ntfs-drive-on-boot-in-ubuntu/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 18:11:56 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[fstab]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ntfs]]></category>
		<category><![CDATA[ntfs-3g]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=972</guid>
		<description><![CDATA[So you&#8217;ve got an NTFS drive you want mounted when your Ubuntu machine boots? Time to pull up your favorite editor and modify /etc/fstab.
This is what I ended up with:

/dev/mapper/sil_aiaiahddacai1 /media/Storage ntfs-3g defaults,gid=1000,uid=1000,locale=en_US.UTF-8 0 0

Replace the gid and uid values with the ids of your group and user. Run id to get these values.
I also [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve got an NTFS drive you want mounted when your Ubuntu machine boots? Time to pull up your favorite editor and modify <code>/etc/fstab</code>.</p>
<p>This is what I ended up with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>sil_aiaiahddacai1 <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>Storage ntfs-3g defaults,<span style="color: #007800;">gid</span>=<span style="color: #000000;">1000</span>,<span style="color: #007800;">uid</span>=<span style="color: #000000;">1000</span>,<span style="color: #007800;">locale</span>=en_US.UTF-<span style="color: #000000;">8</span> <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></div></div>

<p>Replace the <code>gid</code> and <code>uid</code> values with the ids of your group and user. Run <code>id</code> to get these values.</p>
<p>I also had to make sure I created the mount point, otherwise it would fail:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>Storage</pre></div></div>

<p>Anything I&#8217;m missing? So far it seems to work just fine.</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/WPhPhdlvWgI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/mount-your-ntfs-drive-on-boot-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/mount-your-ntfs-drive-on-boot-in-ubuntu/</feedburner:origLink></item>
		<item>
		<title>Music for coding – Trentemøller</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/6WmWnUU3qOw/</link>
		<comments>http://www.tristanwaddington.com/2010/06/music-for-coding-trentem%c3%b8ller/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 17:11:47 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Music For Coding]]></category>

		<guid isPermaLink="false">http://blog.twaddington.com/?p=539</guid>
		<description><![CDATA[Anders Trentemøller [1][2] produces some awesomely deep, dark and incredibly edgy electronica that makes for some great coding music.
If you haven&#8217;t listened to this fantastic Scandinavian artist, I&#8217;d recommend you give him a listen. I really like Moan from his debut album The Last Resort.
You can buy the fantastic Trentemøller &#8211; The Digital Chronicles on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.anderstrentemoller.com/">Anders Trentemøller</a> <sup>[<a href="http://en.wikipedia.org/wiki/Trentem%C3%B8ller">1</a>][<a href="http://www.last.fm/music/Trentem%C3%B8ller">2</a>]</sup> produces some awesomely deep, dark and incredibly edgy electronica that makes for some great coding music.</p>
<p>If you haven&#8217;t listened to this fantastic Scandinavian artist, I&#8217;d recommend you give him a listen. I really like <a href="http://www.youtube.com/watch?v=Nb09LiBfgzg&#038;feature=related&#038;fmt=22">Moan</a> from his debut album <a href="http://en.wikipedia.org/wiki/The_Last_Resort_%28album%29">The Last Resort</a>.</p>
<p>You can buy the fantastic <a href="http://itunes.apple.com/us/album/id266580047">Trentemøller &#8211; The Digital Chronicles</a> on iTunes.</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/6WmWnUU3qOw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/music-for-coding-trentem%c3%b8ller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/music-for-coding-trentem%c3%b8ller/</feedburner:origLink></item>
		<item>
		<title>upaste</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/AzN7nWzNKHs/</link>
		<comments>http://www.tristanwaddington.com/2010/06/upaste/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 20:33:11 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[pastebin]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=914</guid>
		<description><![CDATA[After a brief and torrid affair with Fedora, I gave up and threw Ubuntu 10.04 on my home desktop. One thing that I missed from Fedora was the fpaste utility. This handy little command-line tool lets you paste the results of your shell commands to fpaste.org, a semi-official Fedora pastebin.
After realizing that pastebin.com had an [...]]]></description>
			<content:encoded><![CDATA[<p>After a brief and torrid affair with Fedora, I gave up and threw Ubuntu 10.04 on my home desktop. One thing that I missed from Fedora was the <code>fpaste</code> utility. This handy little command-line tool lets you paste the results of your shell commands to <a href="http://fpaste.org/">fpaste.org</a>, a semi-official Fedora <a href="http://en.wikipedia.org/wiki/Pastebin">pastebin</a>.</p>
<p>After realizing that <a href="http://pastebin.com/">pastebin.com</a> had an open API, I took it upon myself to write a little Python script that could submit pastes for me.</p>
<p>And so I give you <a href="http://bitbucket.org/twaddington/upaste/">upaste</a> (u for Ubuntu, but it can run on any *nix flavor, including OS X). Please try it out and give me your thoughts. I hope someone will find it useful.</p>
<h3>Installing</h3>
<p><a href="http://bitbucket.org/twaddington/upaste/src/">Download the source</a> from bitbucket.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># Copy the upaste file somewhere in your $PATH
$ sudo cp upaste /usr/local/bin/
&nbsp;
# Then run!
$ ifconfig | upaste
&nbsp;
# -h is for help
$ upaste -h
Usage: upaste [options]
  Posts a file to http://pastebin.com/ and returns the URL.
  If no file arguments are given, input is expected on stdin.
&nbsp;
Options:
  --version           show program's version number and exit
  -h, --help          show this help message and exit
  -p, --private       mark your paste private.
  -f FILENAME         filename whose contents you wish to paste.
  -n PASTE_NAME       add your name or a title to paste.
  -e PASTE_EMAIL      send a confirmation email with paste link.
  -s PASTE_SUBDOMAIN  use a pastebin subdomain.
  -x PASTE_EXPIRE     set paste expiration: N = Never, 10M = 10 Minutes, 1H =
                      1 Hour, 1D = 1 Day (default), 1M = 1 Month.
  -l PASTE_FORMAT     define the default syntax highlighting for your paste.</pre></div></div>

<img src="http://feeds.feedburner.com/~r/twaddington/~4/AzN7nWzNKHs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/upaste/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/upaste/</feedburner:origLink></item>
		<item>
		<title>Vim</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/DxGo6m-Lw2U/</link>
		<comments>http://www.tristanwaddington.com/2010/06/vim/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 05:59:28 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[text-editor]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=910</guid>
		<description><![CDATA[So I recently started using Vim as my text-editor of choice. I used to hate Vi with a passion, but lately I&#8217;ve grown frustrated with the bloated, laggy IDE&#8217;s of today, so I turned to Vim.
Vim is a super lightweight text-editor that you run from the terminal. The command syntax made no sense to me [...]]]></description>
			<content:encoded><![CDATA[<p>So I recently started using <a href="http://en.wikipedia.org/wiki/Vim">Vim</a> as my text-editor of choice. I used to hate <a href="http://en.wikipedia.org/wiki/Vi">Vi</a> with a passion, but lately I&#8217;ve grown frustrated with the bloated, laggy IDE&#8217;s of today, so I turned to Vim.</p>
<p>Vim is a super lightweight text-editor that you run from the terminal. The command syntax made no sense to me at first, but slowly I started to learn the basics and soon I was working along as fast as I ever had.</p>
<p>The nice thing about Vim is I can ssh into my web-host and edit files right in the terminal without having to muck with a &#8220;Save remotely as&#8221; feature.</p>
<p>The one thing with Vim is you&#8217;ll probably want to enable syntax highlighting right off the bat.</p>
<p>Here&#8217;s my <code>~/.vimrc</code> config file if you&#8217;re interested:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">syntax on
colorscheme slate
<span style="color: #000000; font-weight: bold;">set</span> number
<span style="color: #000000; font-weight: bold;">set</span> expandtab
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">tabstop</span>=<span style="color: #000000;">4</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">shiftwidth</span>=<span style="color: #000000;">4</span></pre></div></div>

<p>This will turn syntax highlighting and line numbers on, set your default colorscheme to something that isn&#8217;t horrible and set your tabs to four spaces (mainly for Python development).</p>
<p>I&#8217;m even running split views in Vim now, I feel so 1990&#8217;s.</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/DxGo6m-Lw2U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/vim/</feedburner:origLink></item>
		<item>
		<title>emuLAN 3.0</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/WZJJKu0__6s/</link>
		<comments>http://www.tristanwaddington.com/2010/06/emulan-3-0/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 05:30:19 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=874</guid>
		<description />
			<content:encoded><![CDATA[<img src="http://feeds.feedburner.com/~r/twaddington/~4/WZJJKu0__6s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/emulan-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/emulan-3-0/</feedburner:origLink></item>
		<item>
		<title>Psylab Studios</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/eLqEgznAbqY/</link>
		<comments>http://www.tristanwaddington.com/2010/06/psylab-studios/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 05:30:19 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=872</guid>
		<description><![CDATA[(&#8230;)
]]></description>
			<content:encoded><![CDATA[<p>(&#8230;)</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/eLqEgznAbqY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/psylab-studios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/psylab-studios/</feedburner:origLink></item>
		<item>
		<title>UO Accessibility Student Union</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/amDu68ggDu4/</link>
		<comments>http://www.tristanwaddington.com/2010/06/uo-accessibility-student-union/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 05:30:18 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=870</guid>
		<description><![CDATA[(&#8230;)
]]></description>
			<content:encoded><![CDATA[<p>(&#8230;)</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/amDu68ggDu4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/uo-accessibility-student-union/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/uo-accessibility-student-union/</feedburner:origLink></item>
		<item>
		<title>UO Adaptive Sports Club</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/9TQZgDVXtpE/</link>
		<comments>http://www.tristanwaddington.com/2010/06/uo-adaptive-sports-club/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 05:30:18 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=868</guid>
		<description><![CDATA[(&#8230;)
]]></description>
			<content:encoded><![CDATA[<p>(&#8230;)</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/9TQZgDVXtpE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/uo-adaptive-sports-club/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/uo-adaptive-sports-club/</feedburner:origLink></item>
		<item>
		<title>Literary Arts – Give!Guide Portal</title>
		<link>http://feedproxy.google.com/~r/twaddington/~3/fCDeN_xxUWM/</link>
		<comments>http://www.tristanwaddington.com/2010/06/literary-arts-giveguide-portal/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 05:30:18 +0000</pubDate>
		<dc:creator>Tristan Waddington</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.tristanwaddington.com/?p=864</guid>
		<description><![CDATA[(&#8230;)
]]></description>
			<content:encoded><![CDATA[<p>(&#8230;)</p>
<img src="http://feeds.feedburner.com/~r/twaddington/~4/fCDeN_xxUWM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tristanwaddington.com/2010/06/literary-arts-giveguide-portal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tristanwaddington.com/2010/06/literary-arts-giveguide-portal/</feedburner:origLink></item>
	</channel>
</rss>
