<?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>Ben McCann</title>
	<atom:link href="http://www.benmccann.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benmccann.com/blog</link>
	<description>Co-founder at Connectifier. ex-Googler. CMU alum.</description>
	<lastBuildDate>Mon, 20 May 2013 20:44:47 +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>Installing SimpleCV and OpenCV on Ubuntu</title>
		<link>http://www.benmccann.com/blog/installing-simplecv-and-opencv-on-ubuntu/</link>
		<comments>http://www.benmccann.com/blog/installing-simplecv-and-opencv-on-ubuntu/#comments</comments>
		<pubDate>Thu, 09 May 2013 19:55:38 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/blog/?p=768</guid>
		<description><![CDATA[There are many different directions for installing these two software packages and many of them do not work without modification on Ubuntu or install old versions that are broken. To install OpenCV use Jay Rambhia&#8217;s install script. And to install SimpleCV, follow the directions on the SimpleCV GitHub page.]]></description>
				<content:encoded><![CDATA[<p>There are many different directions for installing these two software packages and many of them do not work without modification on Ubuntu or install old versions that are broken.</p>
<p>To install OpenCV use <a href="https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_5.sh">Jay Rambhia&#8217;s install script</a>. And to install SimpleCV, follow the <a href="https://github.com/sightmachine/SimpleCV#ubuntu-1204">directions on the SimpleCV GitHub page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/installing-simplecv-and-opencv-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tmux tutorial</title>
		<link>http://www.benmccann.com/blog/tmux-tutorial/</link>
		<comments>http://www.benmccann.com/blog/tmux-tutorial/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 19:26:13 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/blog/?p=759</guid>
		<description><![CDATA[tmux is a cool tool that allows you to have multiple screens within a single terminal and to have persistent SSH sessions. The documentation and most tutorials are horribly complex, but it&#8217;s actually not that hard to use the basic functionality. Start a new session with: tmux new Detach your session with: tmux detach Reattach <a class="more-link" href="http://www.benmccann.com/blog/tmux-tutorial/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>tmux is a cool tool that allows you to have multiple screens within a single terminal and to have persistent SSH sessions. The documentation and most tutorials are horribly complex, but it&#8217;s actually not that hard to use the basic functionality.</p>
<p>Start a new session with:</p>
<pre class="prettyprint"><code>tmux new</code></pre>
<p>Detach your session with:</p>
<pre class="prettyprint"><code>tmux detach</code></pre>
<p>Reattach your session after detaching or having your SSH session die:</p>
<pre class="prettyprint"><code>tmux attach -d</code></pre>
<p><a href="http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course">Read more on Josh Clayton&#8217;s blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/tmux-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up NX 4 on Ubuntu 12.04 in the cloud</title>
		<link>http://www.benmccann.com/blog/setting-up-nx-4-on-ubuntu-12-04-in-the-cloud/</link>
		<comments>http://www.benmccann.com/blog/setting-up-nx-4-on-ubuntu-12-04-in-the-cloud/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 01:26:53 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=643</guid>
		<description><![CDATA[I wanted a remote graphical environment on a machine in the cloud. I created an Ubuntu 12.04 machine on Microsoft Azure. It&#8217;s very easy to download an NX 4 preview and install it. You&#8217;ll also have to run sudo apt-get install ubuntu-desktop unity-2d gdm since the server install doesn&#8217;t come with a graphical environment by <a class="more-link" href="http://www.benmccann.com/blog/setting-up-nx-4-on-ubuntu-12-04-in-the-cloud/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>I wanted a remote graphical environment on a machine in the cloud. I created an Ubuntu 12.04 machine on Microsoft Azure. It&#8217;s very easy to <a href="http://www.nomachine.com/download-preview.php">download an NX 4 preview</a> and install it. You&#8217;ll also have to run <code>sudo apt-get install ubuntu-desktop unity-2d gdm</code> since the server install doesn&#8217;t come with a graphical environment by default.</p>
<p>If you run into <a href="https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/353356">a problem with the lock screen rejecting your password</a> then you can fix it with it:</p>
<pre class="prettyprint"><code>sudo chown root:shadow /sbin/unix_chkpwd
sudo chmod 2755 /sbin/unix_chkpwd
sudo chown root:shadow /etc/shadow
sudo chmod g+r /etc/shadow</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/setting-up-nx-4-on-ubuntu-12-04-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Ruby RVM on Ubuntu 12.04</title>
		<link>http://www.benmccann.com/blog/ruby-rvm-ubuntu-12-04/</link>
		<comments>http://www.benmccann.com/blog/ruby-rvm-ubuntu-12-04/#comments</comments>
		<pubDate>Sun, 03 Feb 2013 05:07:15 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=640</guid>
		<description><![CDATA[Do not use sudo apt-get install ruby-rvm because it will not work. Here&#8217;s a better way: bash -s stable <]]></description>
				<content:encoded><![CDATA[<p>Do not use <code>sudo apt-get install ruby-rvm</code> because it will not work. Here&#8217;s a <a href="http://29a.ch/2011/10/28/rvm-on-ubuntu-11-10">better way</a>:</p>
<pre class="prettyprint"><code>bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/ruby-rvm-ubuntu-12-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting to SoftLayer VPN on Ubuntu</title>
		<link>http://www.benmccann.com/blog/connecting-to-softlayer-vpn-on-ubuntu/</link>
		<comments>http://www.benmccann.com/blog/connecting-to-softlayer-vpn-on-ubuntu/#comments</comments>
		<pubDate>Sun, 09 Dec 2012 07:47:14 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=636</guid>
		<description><![CDATA[SoftLayer has a private network which is accessible only via VPN. It took me a really long time to figure out how to connect on Ubuntu 12.04 running on VirtualBox. To configure the VPN connection, from the network manager icon in the top right corner click: &#8220;VPN Connections&#8221; > &#8220;Configure VPN&#8230;&#8221;. Use a PPTP VPN, <a class="more-link" href="http://www.benmccann.com/blog/connecting-to-softlayer-vpn-on-ubuntu/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>SoftLayer has a private network which is accessible only via VPN. It took me a really long time to figure out how to connect on Ubuntu 12.04 running on VirtualBox.</p>
<p>To configure the VPN connection, from the network manager icon in the top right corner click: &#8220;VPN Connections&#8221; > &#8220;Configure VPN&#8230;&#8221;. Use a PPTP VPN, enter the gateway, set the username and password, and then under &#8220;Advanced&#8230;&#8221; check &#8220;Use Point-to-Point encryption (MPPE)&#8221;</p>
<p>If you&#8217;re running under VirtualBox then you&#8217;ll need to update the &#8220;Network&#8221; tab to use the attached to &#8220;Bridged Adapter&#8221; setting instead of the default &#8220;NAT&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/connecting-to-softlayer-vpn-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom OS install on SoftLayer</title>
		<link>http://www.benmccann.com/blog/custom-os-install-softlayer/</link>
		<comments>http://www.benmccann.com/blog/custom-os-install-softlayer/#comments</comments>
		<pubDate>Thu, 01 Nov 2012 04:39:53 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=620</guid>
		<description><![CDATA[SoftLayer will allow to setup a handful of OS images by default, but requires you to jump through extra hoops if you&#8217;d like to provide your own ISO or go through the OS install screens yourself. For example, this is most likely the way you&#8217;d install LVM if you&#8217;d like to backup your database via <a class="more-link" href="http://www.benmccann.com/blog/custom-os-install-softlayer/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.softlayer.com/">SoftLayer</a> will allow to setup a handful of OS images by default, but requires you to jump through extra hoops if you&#8217;d like to provide your own ISO or go through the OS install screens yourself. For example, this is most likely the way you&#8217;d install LVM if you&#8217;d like to backup your database via LVM snapshots.</p>
<p>You&#8217;ll first need to put the ISO in your lockbox, which you can find details for from the hardware page for your instance:</p>
<pre class="prettyprint"><code>benmccann@mongo2:~$ wget http://releases.ubuntu.com/12.04/ubuntu-12.04.1-server-amd64.iso
benmccann@mongo2:~$ ftp lockbox01.service.softlayer.com
Name (lockbox501.service.softlayer.com:benmccann): SLLBXXXXXX-X
331 Password required for SLLBXXXXXX-X
Password:
230 User SLLBXXXXXX-X logged in
ftp> put ubuntu-12.04.1-server-amd64.iso</code></pre>
<p>Next you&#8217;ll need to mount the image on your instance. Go to the hardware page for the instance you&#8217;re using and click the &#8220;IPMI address&#8221; link. Connect to the PPTP VPN and then paste the &#8220;Remote Mgmt IP&#8221; in the URL bar of your browser and enter the accompanying username and password. Go to &#8220;Virtual Media&#8221; > &#8220;CD-ROM Image&#8221;. Ping your lockbox to get its IP address since the DNS name will not work here.</p>
<pre class="prettyprint"><code>$ ping lockbox01.service.softlayer.com
PING lockbox01.service.softlayer.com (10.1.194.50) 56(84) bytes of data.</code></pre>
<p>Enter the details making sure to use the IP address instead of hostname and to include the lockbox username in your path:</p>
<pre class="prettyprint"><code>Share host: 10.1.194.50
Path to image: \SLLBXXXXXX-X\ubuntu-12.04.1-server-amd64.iso
User: SLLBXXXXXX-X
Password: ********</code></pre>
<p>At this point you&#8217;ll need to file a ticket with SoftLayer to change the boot order of your machine to boot off the CD instead of the hard drive. You should probably go ahead and try the next step, but then just be aware if the machine boots up without giving you the option to install the new OS then the support ticket will be required.</p>
<p>From the page where you got the IP address, username, and password for the IPMI web console, you can get instructions for downloading IPMIView and connecting to your instance. Do &#8220;File&#8221; > &#8220;New&#8230;&#8221; > &#8220;System&#8221; and after you connect click on the &#8220;KVM Console&#8221; tab then &#8220;Launch KVM Console&#8221;. Now click to the &#8220;IPM Device&#8221; tab and reset the machine. At this point you should see your machine in the KVM window and you can install your OS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/custom-os-install-softlayer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resyncing a very stale MongoDB Replica</title>
		<link>http://www.benmccann.com/blog/resyncing-very-stale-mongodb-replica/</link>
		<comments>http://www.benmccann.com/blog/resyncing-very-stale-mongodb-replica/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 23:06:15 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Datastores]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=607</guid>
		<description><![CDATA[I logged into the primary member of the replica set and ran rs.status() which showed me that the replica was too stale (&#8220;error RS102 too stale to catch up&#8221;): { "_id" : 4, "name" : "55.55.55.55:27017", "health" : 1, "state" : 3, "stateStr" : "RECOVERING", "uptime" : 502511, "optime" : { "t" : 1340841938000, "i" <a class="more-link" href="http://www.benmccann.com/blog/resyncing-very-stale-mongodb-replica/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>I logged into the primary member of the replica set and ran rs.status() which showed me that the replica was too stale (&#8220;error RS102 too stale to catch up&#8221;):</p>
<pre class="prettyprint"><code>{
	"_id" : 4,
	"name" : "55.55.55.55:27017",
	"health" : 1,
	"state" : 3,
	"stateStr" : "RECOVERING",
	"uptime" : 502511,
	"optime" : {
		"t" : 1340841938000,
		"i" : 5028
	},
	"optimeDate" : ISODate("2012-06-28T00:05:38Z"),
	"lastHeartbeat" : ISODate("2012-08-22T22:47:00Z"),
	"pingMs" : 0,
	"errmsg" : "error RS102 too stale to catch up"
},</code></pre>
<p>The <a href="http://www.mongodb.org/display/DOCS/Resyncing+a+Very+Stale+Replica+Set+Member">MongoDB wiki has some instructions on resyncing a very stale replica</a>. I chose to go the simplest route of doing a full resync. To do this I had to figure out where the data was stored, so I looked in <code>/etc/mongodb.conf</code> to see that the <code>dbpath</code> was set to <code>/var/lib/mongodb</code>. Stopping the node, deleting the data directory, and then restarting the node solved the problem. You&#8217;ll need the key file (if you&#8217;re using auth) and the data directory to both exist with the proper ownership and permissions to bring the node back up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/resyncing-very-stale-mongodb-replica/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Windows 7</title>
		<link>http://www.benmccann.com/blog/installing-windows-7/</link>
		<comments>http://www.benmccann.com/blog/installing-windows-7/#comments</comments>
		<pubDate>Mon, 30 Jul 2012 04:04:46 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=602</guid>
		<description><![CDATA[If you need to re-install Windows 7 because you got a new hard drive, you can download a copy of Windows from Microsoft here and then enter your existing product key.  ABR provides one way to get your existing product key.  You can also get a product key for Windows 7 Ultimate and Microsoft Office from <a class="more-link" href="http://www.benmccann.com/blog/installing-windows-7/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>If you need to re-install Windows 7 because you got a new hard drive, you can <a href="http://www.mydigitallife.info/download-windows-7-mui-language-packs-official-32-bit-and-64-bit-direct-download-links/">download a copy of Windows from Microsoft here</a> and then enter your existing product key.  <a href="http://directedge.us/content/abr-activation-backup-and-restore">ABR</a> provides one way to get your existing product key.  You can also get a product key for Windows 7 Ultimate and Microsoft Office from <a href="http://www.microsoft.com/bizspark/default.aspx">Microsoft Bizspark</a> if you run a startup.  If you want to upgrade your existing copy of Windows to a higher edition you can do that by searching for Windows Anytime Upgrade in the start menu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/installing-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google video chat volume on Windows</title>
		<link>http://www.benmccann.com/blog/google-video-chat-volume-on-windows/</link>
		<comments>http://www.benmccann.com/blog/google-video-chat-volume-on-windows/#comments</comments>
		<pubDate>Mon, 23 Jul 2012 00:48:21 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=597</guid>
		<description><![CDATA[I frequently use Google video chat. It was common for the person on the other end to have difficulty hearing me, which I eventually realized was because the microphone level kept being auto-adjusted to very low levels. It turns out that it was Google video chat constantly auto-adjusting the volume level and that the behavior <a class="more-link" href="http://www.benmccann.com/blog/google-video-chat-volume-on-windows/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>I frequently use Google video chat. It was common for the person on the other end to have difficulty hearing me, which I eventually realized was because the microphone level kept being auto-adjusted to very low levels. It turns out that it was Google video chat constantly auto-adjusting the volume level and that the behavior can be turned off by editing a registry setting.</p>
<ul>
<li>Open regedit</li>
<li>Navigate to: HKEY_CURRENT_USER\Software\Google\Google Talk Plugin</li>
<li>Change the audio-flags value data to 1</li>
</ul>
<p>The audio-flags registry key is not there on a clean install of Windows, but will show up once you change the Google video chat settings in GMail.  Note that if you ever change the video chat settings in GMail then it will override the registry settings and you will need to set this flag again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/google-video-chat-volume-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backing Up MySQL with Percona Xtrabackup</title>
		<link>http://www.benmccann.com/blog/backing-up-mysql-with-percona-xtrabackup/</link>
		<comments>http://www.benmccann.com/blog/backing-up-mysql-with-percona-xtrabackup/#comments</comments>
		<pubDate>Sat, 26 May 2012 04:21:45 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Datastores]]></category>

		<guid isPermaLink="false">http://www.benmccann.com/dev-blog/?p=593</guid>
		<description><![CDATA[You can create a MySQL backup with Percona Xtrabackup by running: $ innobackupex --user=DBUSER --password=DBUSERPASS /path/to/BACKUP-DIR/ You can then restore the backup with: $ xtrabackup --prepare --datadir=/var/lib/mysql --target-dir=/path/to/BACKUP-DIR/ $ sudo service mysql stop $ sudo mv /var/lib/mysql ~/dbbackup $ sudo mv /path/to/BACKUP-DIR /var/lib/mysql $ sudo chown -R mysql:mysql /var/lib/mysql $ sudo service mysql start $ <a class="more-link" href="http://www.benmccann.com/blog/backing-up-mysql-with-percona-xtrabackup/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>You can create a MySQL backup with <a href="http://www.percona.com/doc/percona-xtrabackup/">Percona Xtrabackup</a> by running:<br />
<code>$ innobackupex --user=DBUSER --password=DBUSERPASS /path/to/BACKUP-DIR/</code></p>
<p>You can then restore the backup with:</p>
<pre class="prettyprint"><code>$ xtrabackup --prepare --datadir=/var/lib/mysql --target-dir=/path/to/BACKUP-DIR/
$ sudo service mysql stop
$ sudo mv /var/lib/mysql ~/dbbackup
$ sudo mv /path/to/BACKUP-DIR /var/lib/mysql
$ sudo chown -R mysql:mysql /var/lib/mysql
$ sudo service mysql start
$ mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password from /etc/mysql/debian.cnf' WITH GRANT OPTION;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.benmccann.com/blog/backing-up-mysql-with-percona-xtrabackup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
