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

<channel>
	<title>Tanner&#039;s Website</title>
	<atom:link href="http://www.tannr.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tannr.com</link>
	<description>My tube of the web.</description>
	<lastBuildDate>Fri, 22 Feb 2013 18:54:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Mounting partitions contained in a disk image in Linux</title>
		<link>http://www.tannr.com/2013/01/20/mounting-partitions-contained-in-a-disk-image-in-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mounting-partitions-contained-in-a-disk-image-in-linux</link>
		<comments>http://www.tannr.com/2013/01/20/mounting-partitions-contained-in-a-disk-image-in-linux/#comments</comments>
		<pubDate>Sun, 20 Jan 2013 21:56:54 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=653</guid>
		<description><![CDATA[Say you have a disk image created using &#8216;dd&#8217;. You want to mount a partition contained on it but you realize it&#8217;s not as simple as just mounting the image and exploring the path. The kpartx utility can help with &#8230; <a href="http://www.tannr.com/2013/01/20/mounting-partitions-contained-in-a-disk-image-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Say you have a disk image <a title="Cloning a drive the ‘dd’ way" href="http://www.tannr.com/2011/05/27/cloning-a-drive-the-dd-way/">created using &#8216;dd&#8217;</a>. You want to mount a partition contained on it but you realize it&#8217;s not as simple as just mounting the image and exploring the path.</p>
<p>The <a href="http://linux.die.net/man/8/kpartx">kpartx</a> utility can help with that:</p>
<pre><code>sudo kpartx -av disk.img
</code></pre>
<p>This should have created some partition mappings to /dev/mapper. Now, just mount the correct mapping the same way you would mount anything else. For instance:</p>
<pre><code>sudo mount -t ntfs -o ro,noexec /dev/mapper/loop0p1 mounted</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2013/01/20/mounting-partitions-contained-in-a-disk-image-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drawing and connecting nodes with SVG</title>
		<link>http://www.tannr.com/2013/01/13/drawing-and-connecting-nodes-with-svg/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drawing-and-connecting-nodes-with-svg</link>
		<comments>http://www.tannr.com/2013/01/13/drawing-and-connecting-nodes-with-svg/#comments</comments>
		<pubDate>Sun, 13 Jan 2013 20:14:10 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=634</guid>
		<description><![CDATA[This is something I created over a year ago and I&#8217;ve decided to share the code in case someone finds it useful. It&#8217;s nothing more than an example of using JavaScript to dynamically add connectable SVG objects. Usage:  Click a &#8230; <a href="http://www.tannr.com/2013/01/13/drawing-and-connecting-nodes-with-svg/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This is something I created over a year ago and I&#8217;ve decided to share the code in case someone finds it useful.</p>
<p><a href="http://labs.tannr.com/projects/nodes"><img class="alignright size-thumbnail wp-image-635" alt="nodes" src="http://www.tannr.com/wp-content/uploads/2013/01/nodes-150x150.png" width="150" height="150" /></a></p>
<p>It&#8217;s nothing more than an example of using JavaScript to dynamically add connectable SVG objects.</p>
<p><strong>Usage: </strong></p>
<ul>
<li>Click a node and drag</li>
<li>Double-click to generate a node</li>
<li>Click a node, hold down shift, then release over another node to connect</li>
</ul>
<p><a href="http://labs.tannr.com/projects/nodes">Demo </a>(Should be supported by most modern browsers)</p>
<p><a href="http://labs.tannr.com/projects/nodes/download/nodes_1-13-12.zip">Download ZIP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2013/01/13/drawing-and-connecting-nodes-with-svg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting Smith numbers</title>
		<link>http://www.tannr.com/2013/01/12/detecting-smith-numbers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=detecting-smith-numbers</link>
		<comments>http://www.tannr.com/2013/01/12/detecting-smith-numbers/#comments</comments>
		<pubDate>Sun, 13 Jan 2013 03:16:42 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=626</guid>
		<description><![CDATA[After learning about Smith numbers today I cooked up this script fairly quickly. There are many places where it could be optimized and cleaned up but that wasn&#8217;t really the point &#8211; I just needed something that was accurate, and &#8230; <a href="http://www.tannr.com/2013/01/12/detecting-smith-numbers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>After learning about <a href="http://en.wikipedia.org/wiki/Smith_number">Smith numbers</a> today I cooked up this script fairly quickly. There are many places where it could be optimized and cleaned up but that wasn&#8217;t really the point &#8211; I just needed something that was accurate, and I&#8217;m pretty sure this is.</p>
<p>It also helped me to learn about the <a href="http://ss64.com/bash/ulimit.html">ulimit</a> command after running it with a HUGE number that had taken up about 7GB of swap before I had to kill the process remotely via SSH&#8230;</p>
<pre><code>
#!/usr/bin/python
# smith number detector - TWS 1-12-13

def detectSmith(num):
  if(sumFactors(num) == sumDigits(num)):
    return True
  else:
    return False

# calculate the sum of the factors
def sumFactors(num):
  factorList = factors(num)
  sum = 0

  for factor in factorList:
    if factor &gt; 9:
      # if a number (base ten) has multiple digits it has to be broken down
      sum = sum + sumDigits(factor)
    else:
      sum = sum + factor

  return sum

# sum the digits in a number with two or more
def sumDigits(num):
  sum = 0  

  if num &gt; 9:
    while num &gt; 9:
      sum = sum + num % 10
      num = num / 10
    sum = sum + num
    return sum
  else:
    # should never reach this
    return num

def factors(num):
  primeFactorList = []

  factor = lowestPrimeFactor(num)
  currentNum = num

  while factor != -1:
    primeFactorList.append(factor)
    currentNum = currentNum / factor
    factor = lowestPrimeFactor(currentNum)

  if(currentNum != num):
    # preventing returning the number passed in
    primeFactorList.append(currentNum)

  return primeFactorList

def lowestPrimeFactor(num):
  for x in range(2, (num / 2) + 1):
    if(num % x == 0):
      return x
  return -1

for number in range(1, 1000):
  if(detectSmith(number)):
    print "The number", number, "is a Smith number."
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2013/01/12/detecting-smith-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu, PHP, S3, and AWS SDK2 Example</title>
		<link>http://www.tannr.com/2012/12/22/ubuntu-php-s3-and-aws-sdk2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-php-s3-and-aws-sdk2</link>
		<comments>http://www.tannr.com/2012/12/22/ubuntu-php-s3-and-aws-sdk2/#comments</comments>
		<pubDate>Sun, 23 Dec 2012 04:41:30 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=595</guid>
		<description><![CDATA[A super quick, super simple little example of how to get started with the AWS SDK2 for PHP. It connects to the S3 service with your credentials and checks to see if a file exists. Assuming you already have a &#8230; <a href="http://www.tannr.com/2012/12/22/ubuntu-php-s3-and-aws-sdk2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A super quick, super simple little example of how to get started with the AWS SDK2 for PHP. It connects to the S3 service with your credentials and checks to see if a file exists.</p>
<ol>
<li>Assuming you already have a <a href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)">LAMP</a> setup, you may need to install php-pear:
<pre>sudo apt-get install php-pear</pre>
</li>
<li>Add the AWS channel and auto discover dependencies:
<pre>pear channel-discover pear.amazonwebservices.com
pear -D auto_discover=1 install pear.amazonwebservices.com/sdk</pre>
</li>
<li>Download the .phar file <a href="http://aws.amazon.com/sdkforphp/">here</a> and throw it on your server in this script&#8217;s directory (for this example).</li>
<li>Replace the items in brackets and run the script. The [OBJECT KEY] is just the name of the file, so &#8216;mypicture.jpg&#8217; in the root of the bucket would have the key &#8216;mypicture.jpg&#8217;.</li>
</ol>
<pre> &lt;?php

require 'aws.phar';

use Aws\Common\Aws;

$aws = Aws::factory(array(
   'key' =&gt; '[KEY HERE]',
   'secret' =&gt; '[SECRET HERE]'
));

$client = $aws-&gt;get('s3');

echo $client-&gt;doesObjectExist('[BUCKET NAME]', '[OBJECT KEY]');

?&gt;</pre>
<p>You&#8217;ll get back the boolean response of that call (assuming it makes it that far without error). Refer to the <a href="http://docs.amazonwebservices.com/aws-sdk-php-2/latest/">API documentation</a> for the other methods and their responses.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2012/12/22/ubuntu-php-s3-and-aws-sdk2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple Linux content search script</title>
		<link>http://www.tannr.com/2012/09/11/a-simple-linux-content-search-script/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-simple-linux-content-search-script</link>
		<comments>http://www.tannr.com/2012/09/11/a-simple-linux-content-search-script/#comments</comments>
		<pubDate>Tue, 11 Sep 2012 18:52:26 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=567</guid>
		<description><![CDATA[A simple script I use for work to search the contents of files. It just wraps up &#8216;find&#8217; and &#8216;grep&#8217; to recursively search and display the location of the file. #!/bin/bash # Tanner Stokes - 8-23-12 # Search contents of &#8230; <a href="http://www.tannr.com/2012/09/11/a-simple-linux-content-search-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A simple script I use for work to search the contents of files. It just wraps up &#8216;find&#8217; and &#8216;grep&#8217; to recursively search and display the location of the file.</p>
<p><code> #!/bin/bash<br />
# Tanner Stokes - 8-23-12<br />
# Search contents of files</p>
<p>if [ -z "$1" ] || [ -z "$2" ]<br />
then<br />
echo "Usage: csearch \"filetype\" \"content\""<br />
echo "ex: csearch \"*.php\" \"my_function()\""<br />
exit 1<br />
fi</p>
<p>find . -name "$1" -exec grep -Hn "$2" {} \;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2012/09/11/a-simple-linux-content-search-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clemson vs Ole Miss &#8211; Best Tailgaters</title>
		<link>http://www.tannr.com/2012/08/30/clemson-vs-ole-miss-best-tailgaters/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=clemson-vs-ole-miss-best-tailgaters</link>
		<comments>http://www.tannr.com/2012/08/30/clemson-vs-ole-miss-best-tailgaters/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 19:53:07 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=560</guid>
		<description><![CDATA[Clemson and Ole Miss are currently battling it out in a poll on Southern Living&#8217;s website. Out of curiosity I wrote some code to grab this data and graph it to help visualize who is catching up or pulling ahead. &#8230; <a href="http://www.tannr.com/2012/08/30/clemson-vs-ole-miss-best-tailgaters/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Clemson and Ole Miss are currently battling it out in a poll on <a href="http://www.southernliving.com/food/souths-best-tailgate-00417000079284/">Southern Living&#8217;s website</a>. Out of curiosity I wrote some code to grab this data and graph it to help visualize who is catching up or pulling ahead. <a href="http://labs.tannr.com/projects/tailgate">Check it out here!</a></p>
<p><a href="http://labs.tannr.com/projects/tailgate"><img class="size-medium wp-image-561 aligncenter" title="tailgate_graph" src="http://www.tannr.com/wp-content/uploads/2012/08/tailgate_graph-300x158.png" alt="" width="300" height="158" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2012/08/30/clemson-vs-ole-miss-best-tailgaters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some derpy numbers</title>
		<link>http://www.tannr.com/2012/07/10/some-derpy-numbers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-derpy-numbers</link>
		<comments>http://www.tannr.com/2012/07/10/some-derpy-numbers/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 00:55:29 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=531</guid>
		<description><![CDATA[Now that this site has basically turned into &#8216;herp derp&#8216; central, I thought I&#8217;d post some numbers up regarding downloads. Running this command on my Apache access logs provided me with the download numbers for each browser version (in this &#8230; <a href="http://www.tannr.com/2012/07/10/some-derpy-numbers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Now that this site has basically turned into &#8216;<a title="Herp Derp YouTube Comments" href="http://www.tannr.com/herp-derp-youtube-comments/">herp derp</a>&#8216; central, I thought I&#8217;d post some numbers up regarding downloads. Running this command on my Apache access logs provided me with the download numbers for each browser version (in this case Firefox):</p>
<pre>cat access.log | grep xpi | colrm 16 | sort | uniq | wc -l</pre>
<p>&nbsp;</p>
<p><strong>Note: </strong>This method isn&#8217;t exactly super precise, it would only count once per IP, but it does the job. It also doesn&#8217;t account for other sites like download.com.</p>
<p>As of this post:</p>
<p>Chrome: <strong>4722</strong><br />
Firefox: <strong>2564</strong><br />
Safari: <strong>531</strong><br />
Opera: <strong>278</strong></p>
<p><strong>Update: 7-12-12</strong></p>
<p>Shortly after creating this post I got picked up by <a href="http://boingboing.net/">Boing Boing</a>, <a href="http://gizmodo.com/">Gizmodo</a>, and <a href="http://www.reddit.com">Reddit</a>. New numbers:</p>
<p>Chrome: <strong>8026<br />
</strong>Firefox:<strong> 4025<br />
</strong>Safari:<strong> 919<br />
</strong>Opera:<strong> 415<br />
</strong></p>
<p>Go Herp Derp!<strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2012/07/10/some-derpy-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Herp Derp updated</title>
		<link>http://www.tannr.com/2012/06/02/updated-herp-derp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=updated-herp-derp</link>
		<comments>http://www.tannr.com/2012/06/02/updated-herp-derp/#comments</comments>
		<pubDate>Sun, 03 Jun 2012 04:45:18 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=515</guid>
		<description><![CDATA[I got around to fixing some annoying bugs in Herp Derp tonight: When loaded via HTTP Secure (HTTPS) Herp Derp now works (thanks for reminding me @Funshine__Bear) Firefox no longer freaks out when there is only one comment YouTube Feather &#8230; <a href="http://www.tannr.com/2012/06/02/updated-herp-derp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I got around to fixing some annoying bugs in Herp Derp tonight:</p>
<ul>
<li>When loaded via HTTP Secure (HTTPS) Herp Derp now works (thanks for reminding me @Funshine__Bear)</li>
<li>Firefox no longer freaks out when there is only one comment</li>
<li>YouTube Feather Mode is now supported (thanks @_sjs)</li>
</ul>
<p>The latest version is available for all browsers and can be <a href="http://www.tannr.com/herp-derp-youtube-comments/">downloaded here.</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2012/06/02/updated-herp-derp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>April 2012 Herp Derp update</title>
		<link>http://www.tannr.com/2012/04/02/april-2012-herp-derp-update/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=april-2012-herp-derp-update</link>
		<comments>http://www.tannr.com/2012/04/02/april-2012-herp-derp-update/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 01:31:43 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=511</guid>
		<description><![CDATA[Herp Derp&#8217;s had thousands of downloads! Support for different YouTube modes is coming up, as well as a bug fix or two.]]></description>
				<content:encoded><![CDATA[<p>Herp Derp&#8217;s had thousands of downloads! Support for different YouTube modes is coming up, as well as a bug fix or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2012/04/02/april-2012-herp-derp-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Herp Derp Bug Fixed</title>
		<link>http://www.tannr.com/2012/02/13/herp-derp-bug-fixed/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=herp-derp-bug-fixed</link>
		<comments>http://www.tannr.com/2012/02/13/herp-derp-bug-fixed/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 01:39:27 +0000</pubDate>
		<dc:creator>Tanner</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.tannr.com/?p=508</guid>
		<description><![CDATA[I had a minor bug in Herp Derp where the original comments weren&#8217;t showing up on pages other than the first &#8211; this has been resolved.]]></description>
				<content:encoded><![CDATA[<p>I had a minor bug in Herp Derp where the original comments weren&#8217;t showing up on pages other than the first &#8211; this has been resolved.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tannr.com/2012/02/13/herp-derp-bug-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
