<?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>MPD &#187; tech</title>
	<atom:link href="http://blog.mpdaugherty.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mpdaugherty.com</link>
	<description>Mike&#039;s in China, doing tech stuff</description>
	<lastBuildDate>Sun, 05 Feb 2012 04:18:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.mpdaugherty.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>MPD &#187; tech</title>
		<link>http://blog.mpdaugherty.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.mpdaugherty.com/osd.xml" title="MPD" />
	<atom:link rel='hub' href='http://blog.mpdaugherty.com/?pushpress=hub'/>
		<item>
		<title>Ubuntu&#8217;s shell != bash, and how to fix your scripts</title>
		<link>http://blog.mpdaugherty.com/2010/11/15/ubuntus-shell-bash-and-how-to-fix-your-scripts/</link>
		<comments>http://blog.mpdaugherty.com/2010/11/15/ubuntus-shell-bash-and-how-to-fix-your-scripts/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 07:08:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=454</guid>
		<description><![CDATA[I just found out that on Ubuntu, /bin/sh is a symlink to /bin/dash, not to /bin/bash.  Apparently this was changed to make booting up a little bit faster. In any case, it might mean that many of your scripts won&#8217;t work because they are starting with &#8216;#!/bin/sh&#8217;.  Instead, you should have them point directly to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=454&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just found out that on Ubuntu, /bin/sh is a symlink to /bin/dash, not to /bin/bash.  Apparently this was changed to make booting up a little bit faster.</p>
<p>In any case, it might mean that many of your scripts won&#8217;t work because they are starting with &#8216;#!/bin/sh&#8217;.  Instead, you should have them point directly to /bin/bash.  Here&#8217;s a one line script that will update all the scripts in a directory:</p>
<p>find . -type f | xargs sed -i &#8216;s_#!/bin/sh_!/bin/bash_&#8217;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/454/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=454&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/11/15/ubuntus-shell-bash-and-how-to-fix-your-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>How Bespoke Row is running a new-product survey</title>
		<link>http://blog.mpdaugherty.com/2010/09/28/how-bespoke-row-is-running-a-new-product-survey/</link>
		<comments>http://blog.mpdaugherty.com/2010/09/28/how-bespoke-row-is-running-a-new-product-survey/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 00:49:58 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Bespoke Row]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=406</guid>
		<description><![CDATA[We&#8217;ve talked for a long time about adding new products at Bespoke Row, so yesterday I started that process with a survey about custom pants.  We&#8217;re conducting an experiment using our Startup Mastermind spreadsheet &#8211; if we can get 5 positive responses with less than $100 of advertising, we&#8217;ll start selling pants. To begin with, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=406&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve talked for a long time about adding new products at Bespoke Row, so yesterday I started that process with a <a title="Bespoke Row Custom Pants Survey" href="http://www.bespokerow.com/custom-pants-survey.php">survey about custom pants</a>.  We&#8217;re conducting an experiment using our <a title="Startup Experiments" href="http://blog.mpdaugherty.com/2010/08/19/startup-mastermind/">Startup Mastermind</a> spreadsheet &#8211; if we can get 5 positive responses with less than $100 of advertising, we&#8217;ll start selling pants.</p>
<p>To begin with, we thought about what the most important piece of information someone can share with us is.  Perhaps obviously, we realized that it&#8217;s their email address.  With just that, they&#8217;ve shown that they&#8217;re a potential customer by letting us know how to contact them when we&#8217;re ready to sell.</p>
<p>Therefore, we decided to make our initial survey one question long.  We start out on a page that tells people what we&#8217;re doing and asks for their email address.  If they submit it, we add them to our custom pants mailing list on MailChimp.</p>
<div id="attachment_408" class="wp-caption aligncenter" style="width: 390px"><a href="http://mpdaugherty.files.wordpress.com/2010/09/bespoke-row-totally-customized-tailored-pants-for-the-discerning-man-are-you-interested-1.png"><img class="size-full wp-image-408" title="Initial Survey Page - just email address" src="http://mpdaugherty.files.wordpress.com/2010/09/bespoke-row-totally-customized-tailored-pants-for-the-discerning-man-are-you-interested-1.png?w=380&#038;h=155" alt="Initial Survey Page - just email address" width="380" height="155" /></a><br />
<p class="wp-caption-text">Initial Survey Page - just email address</p></div>
<p>Then, we take them to a second page that has all our secondary questions &#8211; what materials/options are they looking for, whether they think the benefit will be better fit or better style, etc.  None of these are required, but if the user answers them, they&#8217;d help us make a better product.  The answers from these questions are collected in a Google Spreadsheet Form that gives us the ability to analyze the answers easily using Google&#8217;s tools.</p>
<div id="attachment_409" class="wp-caption aligncenter" style="width: 390px"><a href="http://mpdaugherty.files.wordpress.com/2010/09/bespoke-row-custom-tailored-stylish-men_s-dress-shirts.png"><img class="size-full wp-image-409" title="Details Survey" src="http://mpdaugherty.files.wordpress.com/2010/09/bespoke-row-custom-tailored-stylish-men_s-dress-shirts.png?w=380&#038;h=199" alt="Details Survey" width="380" height="199" /></a><p class="wp-caption-text">Details Survey Second</p></div>
<p>I think the best part of this survey is that we randomly choose an amount of money in our potential price range and ask them &#8220;Would you be willing to pay $X for a pair of custom pants?&#8221;  This is far better than the last survey I tried, when I asked this as a multiple choice question and every person naturally chose the lowest listed price.</p>
<p>Finally, we take the user to a thank-you page and encourage them to try a custom shirt while they&#8217;re waiting.</p>
<p>All together, this was pretty easy to set up (about 5 hours) and uses MailChimp and Google Docs, which are both great free tools that do their job better than we could in-house.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/406/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=406&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/09/28/how-bespoke-row-is-running-a-new-product-survey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>

		<media:content url="http://mpdaugherty.files.wordpress.com/2010/09/bespoke-row-totally-customized-tailored-pants-for-the-discerning-man-are-you-interested-1.png" medium="image">
			<media:title type="html">Initial Survey Page - just email address</media:title>
		</media:content>

		<media:content url="http://mpdaugherty.files.wordpress.com/2010/09/bespoke-row-custom-tailored-stylish-men_s-dress-shirts.png" medium="image">
			<media:title type="html">Details Survey</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OSX &#8211; tabbing in forms and skipping select controls.</title>
		<link>http://blog.mpdaugherty.com/2010/08/12/mac-os-and-tabbing-in-forms-that-skips-select-controls/</link>
		<comments>http://blog.mpdaugherty.com/2010/08/12/mac-os-and-tabbing-in-forms-that-skips-select-controls/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 03:50:56 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=343</guid>
		<description><![CDATA[The fact that when I tab through a form on my Mac, it skips the drop downs, which forces me to use the mouse, has been bugging me for a long time.  I finally decided to try searching google for an answer and came upon this old, but still very relevant post by Tony Spencer: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=343&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The fact that when I tab through a form on my Mac, it skips the drop downs, which forces me to use the mouse, has been bugging me for a long time.  I finally decided to try searching google for an answer and came upon this old, but still very relevant post by Tony Spencer:</p>
<p><a title="Tab Skips Select Form Fields in Mac Browsers" href="http://www.tonyspencer.com/2006/05/02/tab-skips-select-form-fields-in-mac-browsers/">http://www.tonyspencer.com/2006/05/02/tab-skips-select-form-fields-in-mac-browsers/</a></p>
<p>Awesome.  The only difference between 2006 and now (Snow Leopard) is that in System Preferences, Keyboard and Mouse have been split into two separate menus, so you should go System Preferences &gt;&gt; Keyboard &gt;&gt; Keyboard Shortcuts to find the &#8216;All controls&#8217; radio button.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/343/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=343&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/08/12/mac-os-and-tabbing-in-forms-that-skips-select-controls/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>Beijing Startup Resources</title>
		<link>http://blog.mpdaugherty.com/2010/08/10/beijing-startup-resources/</link>
		<comments>http://blog.mpdaugherty.com/2010/08/10/beijing-startup-resources/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 10:15:51 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Beijing]]></category>
		<category><![CDATA[coworking]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=335</guid>
		<description><![CDATA[I recently read a great blog post from Jon O&#8217;Shaughnessy that lists all the startup resources in Boston and a similar post by Rob Go provides a todo list for new entrepreneurs in the area.  I thought it was a great idea, so this is my attempt to do the same for Beijing.  Beijing&#8217;s startup [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=335&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently read a great blog post from Jon O&#8217;Shaughnessy that lists all the <a title="Boston Startup Ecosystem" href="http://www.jonoshaughnessy.org/boston-startup-ecosystem-resources-people/">startup resources in Boston</a> and a similar post by Rob Go provides a <a href="http://www.robgo.org/post/219075071/a-to-do-list-for-new-entrepreneurs-arriving-in-boston">todo list</a> for new entrepreneurs in the area.  I thought it was a great idea, so this is my attempt to do the same for Beijing.  Beijing&#8217;s startup scene isn&#8217;t quite as cohesive as Boston&#8217;s, which should make a list even more useful.  I&#8217;m going to keep adding to this as I learn more, so please add anything I miss in the comments.</p>
<h2>Events and Groups</h2>
<ul>
<li><a title="Beijing Coworking" href="http://www.beijingcoworking.com">Beijing Coworking</a> &#8211; Beijing Coworking is a group of independent workers who like to work together better than being lonely working at home.  For the most part, we&#8217;re techie/startup people, so the biggest benefit is having other people to talk to about ideas and problems with our businesses.</li>
<li><a href="http://www.webwednesday.asia/beijing/">Beijing Web Wednesday</a> &#8211; Startup and tech folks who meet once a month at Nearby The Tree.  Usually there&#8217;s a presentation and then some time afterward for networking.</li>
<li><a title="iWeekend Beijing" href="http://www.iweekendbeijing.org/">iWeekend Beijing</a> &#8211; This is part business plan competition, part networking event.  The first one in November was a huge success, and they&#8217;re planning to have more later.</li>
<li><a title="Startup Weekend Beijing" href="http://startupweekendbeijing.com/">StartupWeekend Beijing</a> &#8211; Very similar to iWeekend, except that it focuses on slightly later stage ideas.  At the end of the weekend, there will probably be a few ideas that get funding.</li>
<li><a title="Beijing Hacker Lab" href="http://www.yuanfenflow.com/hackerlab">Beijing HackerLab</a> &#8211; Hosted by Yuanfen~flow incubator, the plan is to have an open space every two weeks to give people space to work on random projects.  The first one will be December 11, 2010.<a title="Beijing Hacker Lab" href="http://www.yuanfenflow.com/hackerlab"><br />
</a></li>
<li><a href="http://www.facebook.com/group.php?gid=7228376070#%21/group.php?gid=7228376070&amp;v=wall">Mobile Monday</a> &#8211; I haven&#8217;t had a chance to go to this yet, especially since my startup isn&#8217;t mobile related, but I hear it&#8217;s also exciting</li>
</ul>
<h2>People</h2>
<ul>
<li>Benjamin Joffe &#8211; <a title="Benjamin Joffe on Twitter" href="http://twitter.com/benjaminjoffe">Twitter</a> Organizer of Mobile Monday and deep thinker about tech in Asia.  I really enjoyed his presentation at the Geeks on a Plane Beijing mixer</li>
<li>Frank Yu &#8211; <a href="http://twitter.com/frankyu">Twitter</a> Edits the Beijing Startup Digest newsletter</li>
<li>Lee Kai-Fu &#8211; <a title="Lee Kai-Fu on Twitter" href="http://twitter.com/kaifulee/">Twitter</a> Ex. Google head and founder of <a href="http://en.innovation-works.com/">Innovation Works</a></li>
<li>Me &#8211; <a href="http://twitter.com/mpdaugherty">Twitter</a> &#8211; only partially joking here; I&#8217;m trying to learn as much as I can in Beijing as well, so if you&#8217;re doing cool stuff, I&#8217;d love to follow you.</li>
</ul>
<h2>Newsletters</h2>
<ul>
<li><a href="http://thestartupdigest.com/">The Startup Digest Beijing</a> &#8211; currently edited by Frank Yu.  Fairly new, so only about one event per week listed.  I&#8217;m sure it will get better and bigger.</li>
</ul>
<h2>Blogs</h2>
<ul>
<li><a title="Mobinode" href="http://www.mobinode.com/category/china-web2/">Mobinode China 2.0</a> &#8211; This is a big blog that covers tech all around Asia, not just startups.  I linked to the China Web 2.0 category, which has more focused content, but there&#8217;s a lot on there.  To be totally honest, I&#8217;m not sure how good this will be, as I just added it to my RSS reader today.</li>
</ul>
<h2>Incubators</h2>
<ul>
<li><a title="Yuanfen~flow incubator" href="http://www.yuanfenflow.com/">Yuanfen~flow</a> This is an art gallery/incubator based in 798.  They host Beijing&#8217;s Hacker Lab, and currently have a few projects that they&#8217;re incubating.</li>
</ul>
<h2>Angel Investors</h2>
<ul>
<li><a title="Intuitive Capital" href="http://www.intuicap.com/">Intuitive Capital</a> &#8211; I met a woman from this company at Web Wednesday in August.  She said they&#8217;re interested in funding startups that have some traction, but haven&#8217;t yet needed to raise any outside money.</li>
<li>Chris Evdemon &#8211; <a href="http://twitter.com/#!/evdemon">Twitter</a> I saw him on Angellist as an Angel in Beijing.  <a href="http://j.mp/bfSPUX">You can pitch him here</a>.  I believe he also works at Innovation Works.</li>
</ul>
<h2>Venture Capital</h2>
<ul>
<li>I don&#8217;t actually know who the VCs are that are active in Beijing yet&#8230;  Add them to the comments!</li>
</ul>
<p>There are also occasional one-off events, like when Geeks on a Plane showed up, that are great but don&#8217;t repeat, so I haven&#8217;t included them here.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=335&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/08/10/beijing-startup-resources/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>JSLint&#8217;s &#8216;unexpected end of line&#8217; vs. JQuery style</title>
		<link>http://blog.mpdaugherty.com/2010/06/10/jslints-ambiguous-end-of-line-vs-jquery-style/</link>
		<comments>http://blog.mpdaugherty.com/2010/06/10/jslints-ambiguous-end-of-line-vs-jquery-style/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 09:21:12 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jslint]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=291</guid>
		<description><![CDATA[I recently added a script to run JSLint over any javascript files that were changed in my last batch of commits when I push changes to our main repository (if you&#8217;re interested, you can take a look).  Immediately, I had my feelings hurt when it started reporting a bunch of errors and warnings. Most of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=291&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently added a script to run JSLint over any javascript files that were changed in my last batch of commits when I push changes to our main repository (if you&#8217;re interested, you can <a title="gitsafepush script" href="http://gist.github.com/432727">take a look</a>).  Immediately, I had my feelings hurt when it started reporting a bunch of errors and warnings.</p>
<p>Most of them I agreed with, but the ambiguous end of line warning when the line was catching syntax that I had very purposefully used to increase readability (for me). <span id="more-291"></span> Basically, this warning appears if a line doesn&#8217;t end with an operator like &#8216;+&#8217; or &#8216;.&#8217; that indicates there&#8217;s another part required.  However, I like to use these operators at the beginning of a new line in order to make it easy to scan and see which lines are continuations.</p>
<p>For example, I would write my jQuery code like this:</p>
<p><pre class="brush: jscript;">
$(&quot;#someId&quot;).after(&quot;&lt;br /&gt;&quot;)
     .css(&quot;color&quot;,&quot;red&quot;)
     .show();
</pre></p>
<p>However, this will generate &#8220;<code>lint warning: unexpected end of line; it is ambiguous whether these lines are part of the same statement</code>&#8221; for the last two lines.  Instead, JSLint expects the code to be written like this:</p>
<p><pre class="brush: jscript;">
$(&quot;#someId&quot;).after(&quot;&lt;br /&gt;&quot;).
     css(&quot;color&quot;,&quot;red&quot;).
     show();
</pre></p>
<p>To me, this makes it too easy to not notice that methods like &#8216;css&#8217; and &#8216;show&#8217; are properties of an object and not just individual methods.  On the other hand, I wasn&#8217;t sure whether it would be a good idea to just ignore a warning from lint because it would look prettier.</p>
<p>Therefore, I talked it over with my coworker, <a href="http://www.the-xavi.com/">Xavi</a>, and he suggested we turn off the Lint check for this &#8216;error&#8217;.  In addition to us, pretty much the whole jQuery community agrees with our formatting.  As long as we pay attention to the other errors in Lint, we shouldn&#8217;t be writing code with missing semi-colons.</p>
<p>To fix this, I just added a configuration file with a single line: &#8220;-ambiguous_newline&#8221;.  Once I referenced the config file in our script, these errors stopped being reported.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=291&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/06/10/jslints-ambiguous-end-of-line-vs-jquery-style/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>mysql_connect and &#8216;No such file or directory&#8217;</title>
		<link>http://blog.mpdaugherty.com/2010/06/02/mysql_connect-no-such-file/</link>
		<comments>http://blog.mpdaugherty.com/2010/06/02/mysql_connect-no-such-file/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 00:49:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[socket]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=272</guid>
		<description><![CDATA[I was working with a friend to get him started with PHP development on OSX, and we were stumped by a &#8216;No such file or directory&#8217; error message for a long time.  It seemed to be coming from the following line: $this-&#62;linkid = @mysql_pconnect($host, $user, $password) or die(mysql_error()); At first, we didn&#8217;t understand it, because [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=272&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was working with a friend to get him started with PHP development on OSX, and we were stumped by a &#8216;No such file or directory&#8217; error message for a long time.  It seemed to be coming from the following line:</p>
<p style="padding-left:30px;"><code>$this-&gt;linkid = @mysql_pconnect($host, $user, $password) or die(mysql_error());</code></p>
<p>At first, we didn&#8217;t understand it, because it doesn&#8217;t look like PHP is trying to connect to a file there.  However, we eventually discovered that the file that wasn&#8217;t found was the MySQL socket.  Because he had used Ports to install MySQL instead of downloading the .dmg from mysql.com, he didn&#8217;t have the same default socket as most other people on the internet.<span id="more-272"></span></p>
<p>If you are also getting this error, follow the steps below to diagnose and fix it.</p>
<ol>
<li>Narrow down error to mysql_connect() or mysql_pconnect().</li>
<li>Make a phpinfo() page.  Look for &#8216;<strong>mysql.default_socket</strong>&#8216;, &#8216;<strong>mysqli.default_socket</strong>&#8216;, and &#8216;<strong>pdo_mysql.default_socket</strong>&#8216;.  Remember their value; this is where PHP is trying to connect to MySQL.</li>
<li>Start mysql.  Execute &#8216;<code>STATUS;</code>&#8216; and look for the &#8216;<strong>UNIX socket</strong>&#8216; value.  If doesn&#8217;t match the value from phpinfo(), that&#8217;s the culprit.</li>
<li>Open your php.ini file (which is also found on your phpinfo() page as &#8216;<strong>Loaded Configuration File</strong>&#8216;) and change all the occurrences of the incorrect socket location to the correct socket location from MySQL.</li>
<li>Restart Apache (on OSX: <code>sudo apachectl restart</code>) and try reloading your page.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/272/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=272&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/06/02/mysql_connect-no-such-file/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>sed in-place editing (-i) difference on Mac OS X: &#8220;undefined label&#8221; errors</title>
		<link>http://blog.mpdaugherty.com/2010/05/27/difference-with-sed-in-place-editing-on-mac-os-x-vs-linux/</link>
		<comments>http://blog.mpdaugherty.com/2010/05/27/difference-with-sed-in-place-editing-on-mac-os-x-vs-linux/#comments</comments>
		<pubDate>Thu, 27 May 2010 13:52:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=243</guid>
		<description><![CDATA[I ran into this problem about a month ago with a bash script that I was writing on my MacBook Pro.  For some reason, sed in place editing with &#8216;sed -i&#8216; just wouldn&#8217;t work, no matter what I did, and I couldn&#8217;t find any solution online. When running something like you get the error message [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=243&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I ran into this problem about a month ago with a bash script that I was writing on my MacBook Pro.  For some reason, sed in place editing with &#8216;<code>sed -i</code>&#8216; just wouldn&#8217;t work, no matter what I did, and I couldn&#8217;t find any solution online.</p>
<p>When running something like</p>
<p><pre class="brush: bash;">
sed -i 's/before/after/' test.txt
</pre></p>
<p>you get the error  message <strong><code>sed: 1: "test.txt": undefined label 'est.txt'</code></strong>.</p>
<p>Eventually, it turned out to be because sed&#8217;s &#8216;<code>-i</code>&#8216; option takes a parameter to indicate what extension to add to the file name when making a backup.  For example,</p>
<p><pre class="brush: bash;">
sed -i '.bak' 's/before/after/' test.txt
</pre></p>
<p>leaves you with two files, &#8216;<code>test.txt</code>&#8216; and &#8216;<code>test.txt.bak</code>&#8216;, where &#8216;<code>test.txt.bak</code>&#8216; is the original version.  Unlike Ubuntu and other linux versions, on OS X, this extension parameter is required.  If you really know what you&#8217;re doing and don&#8217;t want a backup made, you need to provide an empty string &#8221;.</p>
<p>The correct way to run this command on OSX is</p>
<p><pre class="brush: bash;">
sed -i '' 's/before/after/' test.txt
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/243/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=243&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/05/27/difference-with-sed-in-place-editing-on-mac-os-x-vs-linux/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>How to include git hooks in a repository AND still personalize your machine</title>
		<link>http://blog.mpdaugherty.com/2010/04/06/how-to-include-git-hooks-in-a-repository-and-still-personalize-your-machine/</link>
		<comments>http://blog.mpdaugherty.com/2010/04/06/how-to-include-git-hooks-in-a-repository-and-still-personalize-your-machine/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 14:04:05 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[my software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=226</guid>
		<description><![CDATA[In my new job as Director of Engineering at 25Lux.com, I&#8217;ve been dealing with a lot of the infrastructure parts of development that I mostly glossed over before because I always worked at a company that had everything set up for me.  It&#8217;s a good chance to think about in what kind of environment I&#8217;d [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=226&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my new job as Director of Engineering at 25Lux.com, I&#8217;ve been dealing with a lot of the infrastructure parts of development that I mostly glossed over before because I always worked at a company that had everything set up for me.  It&#8217;s a good chance to think about in what kind of environment I&#8217;d really like to develop.</p>
<p>It turns out that big part of my answer involves automating everything.  Part of my reasoning is that our team is very small now, so the more we automate, the more we can concentrate on just development.  Another part of my reasoning is that I&#8217;ve read a lot about continuous deployment lately and many of the principles like decreasing the time between developing a hypothesis and learning your answer make sense and can only be achieved through extensive automation.<span id="more-226"></span></p>
<p>To that end, I&#8217;ve decided that all the developers should have some common git hooks in their repositories that will do things like run tests, etc.  Moreover, since we&#8217;ll be spending a lot of time developing these hook scripts, I&#8217;d like them to be backed up and versioned as well &#8211; i.e. also in the repository.</p>
<p>Therefore, my first step was to create a folder in the repository called <code>/git_hooks/</code> and symlink <code>/.git/hooks</code> -&gt; <code>/git_hooks/</code>.  This way, any changes we make to the hooks will be automatically applied across all the developers&#8217; machines.</p>
<p>However, this has a downside in that everyone&#8217;s hooks become the same and they are unable to add their own (I, for example, might like to add a spell checker to my commit comments, but that would be annoying if someone didn&#8217;t like it).  To solve that problem, I created a <code>/git_hooks/personal/</code> directory which behaves just like the normal <code>/.git/hooks/</code> directory, and any hooks a developer adds in there get executed as part of the common hook.  Here&#8217;s the code I used as the base of all of our common hooks to make it work:</p>
<p><pre class="brush: bash;">
#!/bin/sh

# Check if the individual developer has his own hook
CMD_NAME=`basename $0`
if [ -f $GIT_DIR/hooks/personal/$CMD_NAME ]
then
  # If so, run it. $@ passes all the command line arguments passed to this function
  # If the personal hook fails, fail this one as well
  if ! $GIT_DIR/hooks/personal/$CMD_NAME $@
  then
    echo &quot;User hook '$CMD_NAME' failed&quot;
    exit 1
  fi
fi

exit 0
</pre></p>
<p>Finally, if any developer does decide to add their own hooks in <code>/git_hooks/personal/</code>, they should be sure to add a line containing &#8220;<code>/git_hooks/personal/*[^.sample]</code>&#8221; to the end of their <code>/.git/info/exclude</code> file so that git will ignore their customizations.</p>
<p>You can download this at <a href="http://gist.github.com/357538">http://gist.github.com/357538</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/226/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=226&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/04/06/how-to-include-git-hooks-in-a-repository-and-still-personalize-your-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>Staying Connected Overseas with Google Voice and Skype</title>
		<link>http://blog.mpdaugherty.com/2010/03/11/staying-connected-overseas-google-voice-skype/</link>
		<comments>http://blog.mpdaugherty.com/2010/03/11/staying-connected-overseas-google-voice-skype/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 16:17:26 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[call forwarding]]></category>
		<category><![CDATA[china]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[custom ring schedule]]></category>
		<category><![CDATA[do not disturb]]></category>
		<category><![CDATA[google voice]]></category>
		<category><![CDATA[international]]></category>
		<category><![CDATA[overseas]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=211</guid>
		<description><![CDATA[Step-by-step instructions for how to use Google Voice and Skype together to get an inexpensive US phone number that will forward to your cell phone internationally.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=211&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I first moved to China, I decided that I still wanted to stay connected to the US.  Part of that is keeping a US phone number that can both send and receive calls and text messages.  Luckily, thanks to products like Google Voice and Skype, doing so is now cheap and easy.<br />
<span id="more-211"></span><br />
If you&#8217;ve used Google Voice, you are already used to the idea of having a forwarding phone number &#8211; every time someone calls your Google Voice number, the call is forwarded to your regular phone.  My phone is in China, though, so it doesn&#8217;t work quite so easily; Google Voice does not support adding overseas phone numbers to an account yet.</p>
<p>When I first set up my Google Voice account, I was living in the US and used my US cell phone.  However, I canceled my contract with AT&amp;T, so I didn&#8217;t even have that anymore.  If you&#8217;re in a similar situation and would like to continue to have a US-based phone while you&#8217;re abroad, feel free to follow along with my setup below.</p>
<h2>1. Turn off call forwarding for your old phone</h2>
<p>My first step was to turn off SMS forwarding and enable &#8216;Do Not Disturb&#8217; mode so that while I had no physical phone, my calls and text messages would not be forwarded to some stranger who ended up with my old number.</p>
<p>To do that, you need to do two things in Google Voice.  First, make sure your messages are sent to your email.  Go to Settings-&gt;Voicemail &amp; SMS.  Within that tab, turn on Voicemail Notifications and SMS Forwarding.  Don&#8217;t forget to save your changes.</p>
<div class="wp-caption alignnone" style="width: 400px"><img title="Forwarding Google Voice to Email" src="http://img.skitch.com/20100311-qm7ehy9qxyy8aef38j1ja897a5.jpg" alt="Forwarding Google Voice to Email" width="390" height="301" /><p class="wp-caption-text">Forwarding Google Voice to Email</p></div>
<p>Next, turn on Do Not Disturb mode to prevent calls from being forwarded to your old phone number.  This is under Settings-&gt;Calls.</p>
<div class="wp-caption alignnone" style="width: 400px"><img title="Do Not Disturb" src="http://img.skitch.com/20100311-ehwfjpe5n5ydq89arcy8hay9wd.jpg" alt="Enabling Do Not Disturb in Google Voice" width="390" height="300" /><p class="wp-caption-text">Do Not Disturb</p></div>
<p>Now, you can send and receive text messages, and you can receive incoming calls.  All the calls go to voicemail, but at least you can get messages.</p>
<h2>2. Allow incoming calls with a Skype-In number</h2>
<p>To start making and receiving calls again for real, you need to set up a Skype account with the ability to receive calls.  A basic skype account is free, but to receive calls in the US, it will cost you $18 for 3 months.</p>
<p>Once you have a basic Skype account set up, to add support for incoming calls, go to Account-&gt;View Account from the menu bar.</p>
<div class="wp-caption alignnone" style="width: 400px"><img title="Skype - View Account" src="http://img.skitch.com/20100311-dmq3rysk8tsd96aewsm3ey39j.jpg" alt="Skype - View Account" width="390" height="335" /><p class="wp-caption-text">Skype - View Account</p></div>
<p>Now that you have your Skype account page open, you want to buy an &#8216;Online Number&#8217;.  Go to that tab and set up a number in the US.</p>
<div class="wp-caption alignnone" style="width: 400px"><img title="Skype - Online Number" src="http://img.skitch.com/20100311-efrhiqm1dfqfhfw5j8tq3sj196.jpg" alt="Skype - Online Number" width="390" height="172" /><p class="wp-caption-text">Skype - Online Number</p></div>
<h2>3. Set up your new Skype number as a phone in Google Voice</h2>
<p>Once you have your new Skype number, go back to Google Voice and add it as a telephone &#8211; Settings-&gt;Phones-&gt;Add a new phone.  I call mine &#8216;Skype&#8217;.  You don&#8217;t want to receive SMS messages on this phone, because you&#8217;re already receiving them in your email, so choose &#8216;Home&#8217; as your phone type.  Make sure you&#8217;re signed into Skype right now.</p>
<div class="wp-caption alignnone" style="width: 400px"><img title="Adding Skype Number to Google Voice" src="http://img.skitch.com/20100311-dysecjqi1te7gsew4q4up53u9j.jpg" alt="Adding Skype Number to Google Voice" width="390" height="194" /><p class="wp-caption-text">Adding Skype Number to Google Voice</p></div>
<p>You&#8217;ll receive a call on Skype asking you to input a two digit number.  You&#8217;ll have to open the digital keypad to input the number.</p>
<div class="wp-caption alignnone" style="width: 350px"><img title="Skype - Keypad Button" src="http://img.skitch.com/20100311-jghbrje9nk9sx5eb83np4smmhs.jpg" alt="Skype - Keypad Button" width="340" height="392" /><p class="wp-caption-text">Skype - Keypad Button</p></div>
<p>At this point, you should delete your old number in Google Voice and turn off &#8216;Do Not Disturb&#8217;, so that Google Voice begins forwarding your calls again.  If someone calls your Google Voice number, you will receive the call on Skype, as long as you are signed in.</p>
<h2>4. Enable international call forwarding in Skype</h2>
<p>What if you are not signed in, though?  Supposing you have a phone number in your current country, you can set up Skype to forward the call to your phone number.  To do this, you need to add some Skype credit and set up a forwarding number in the View Account page.</p>
<div class="wp-caption alignnone" style="width: 400px"><img title="Skype - Adding Credit and a Forwarding Number" src="http://img.skitch.com/20100311-m1i3g2eub2as9se2p43gh5qycw.jpg" alt="Skype - Adding Credit and a Forwarding Number" width="390" height="166" /><p class="wp-caption-text">Skype - Adding Credit and a Forwarding Number</p></div>
<p>Now, if you are not signed into Skype, and someone calls your Google Voice number, the call will be forwarded to Skype, which will then forward it to your new phone number at regular Skype rates (for me, US-&gt;China is 2.1 cents/minute).  Therefore, you should be sure to buy some Skype credits as well.</p>
<h2>5. Set up a &#8220;do not disturb&#8221; schedule in Google Voice (optional)</h2>
<p>This is pretty good, but there&#8217;s one last optimization I made.  If you are worried about people calling who don&#8217;t know you&#8217;re out of the country and waking you up in the middle of the night, you can set up Google Voice to only ring your phone during the daytime in your timezone; otherwise, calls go straight to voicemail.  This has already saved me twice when my bank called to ask me some survey questions.</p>
<h3>a. Set the time zone for your Google account</h3>
<p>First, make sure your Google account is set up for the right time zone.  Go to Settings-&gt;Account and select your time zone from the drop down menu.</p>
<div class="wp-caption alignnone" style="width: 401px"><img title="Setting the Google Account Timezone" src="http://img.skitch.com/20100311-q825jxhrpabtwuu73tg98ifacs.jpg" alt="Setting the Google Account Timezone" width="391" height="155" /><p class="wp-caption-text">Setting the Google Account Timezone</p></div>
<h3>b. Create a custom ring schedule</h3>
<p>Then, to set up a custom ring schedule for your phone, go to Settings-&gt;Phones-&gt;Skype and click the &#8216;Edit&#8217; button.</p>
<div class="wp-caption alignnone" style="width: 401px"><img title="Google Voice - Editing the Skype Phone" src="http://img.skitch.com/20100311-be62bcs34gu6gqh1yywp4uae7b.jpg" alt="Google Voice - Editing the Skype Phone" width="391" height="166" /><p class="wp-caption-text">Google Voice - Editing the Skype Phone</p></div>
<p>Finally, click &#8216;Show Advanced Settings&#8217; and go down to the Ring Schedule settings.  Here, you can get as fancy as you want.  I have mine set up to not ring from midnight until 6am on weekdays and from 1am to 7am on weekends.</p>
<div class="wp-caption alignnone" style="width: 400px"><img title="Google Voice - Custom Ring Schedules" src="http://img.skitch.com/20100311-qq7mtiwkb94m9jdq2cq44qe56f.jpg" alt="Google Voice - Custom Ring Schedules" width="390" height="292" /><p class="wp-caption-text">Google Voice - Custom Ring Schedules</p></div>
<h2>6. Enjoy your new international phone number!</h2>
<p>That&#8217;s it!  You now have a US phone number that you can use anywhere in the world for about 2-3 cents per minute for voice and includes free, unlimited text messages.  To make a call, just use Google Voice as usual by calling your contact and selecting &#8216;Skype&#8217; as the phone to ring.  If you&#8217;re on you&#8217;re computer and are signed into Skype, you will get the call on Skype and won&#8217;t have to pay for it at all.  If you&#8217;re not near your computer, your cell phone will ring and you&#8217;ll pay Skype&#8217;s international rate.  Incoming calls work the same way.</p>
<p>Hope this helps someone!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=211&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2010/03/11/staying-connected-overseas-google-voice-skype/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-qm7ehy9qxyy8aef38j1ja897a5.jpg" medium="image">
			<media:title type="html">Forwarding Google Voice to Email</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-ehwfjpe5n5ydq89arcy8hay9wd.jpg" medium="image">
			<media:title type="html">Do Not Disturb</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-dmq3rysk8tsd96aewsm3ey39j.jpg" medium="image">
			<media:title type="html">Skype - View Account</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-efrhiqm1dfqfhfw5j8tq3sj196.jpg" medium="image">
			<media:title type="html">Skype - Online Number</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-dysecjqi1te7gsew4q4up53u9j.jpg" medium="image">
			<media:title type="html">Adding Skype Number to Google Voice</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-jghbrje9nk9sx5eb83np4smmhs.jpg" medium="image">
			<media:title type="html">Skype - Keypad Button</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-m1i3g2eub2as9se2p43gh5qycw.jpg" medium="image">
			<media:title type="html">Skype - Adding Credit and a Forwarding Number</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-q825jxhrpabtwuu73tg98ifacs.jpg" medium="image">
			<media:title type="html">Setting the Google Account Timezone</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-be62bcs34gu6gqh1yywp4uae7b.jpg" medium="image">
			<media:title type="html">Google Voice - Editing the Skype Phone</media:title>
		</media:content>

		<media:content url="http://img.skitch.com/20100311-qq7mtiwkb94m9jdq2cq44qe56f.jpg" medium="image">
			<media:title type="html">Google Voice - Custom Ring Schedules</media:title>
		</media:content>
	</item>
		<item>
		<title>Root access on Ubuntu server?</title>
		<link>http://blog.mpdaugherty.com/2009/11/01/root-access-ubuntu/</link>
		<comments>http://blog.mpdaugherty.com/2009/11/01/root-access-ubuntu/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 16:10:04 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.mpdaugherty.com/?p=173</guid>
		<description><![CDATA[I&#8217;m in the process of setting up my very first production server using Ubuntu, and I&#8217;ve ended up spending a lot of time reading about security online.  Since I&#8217;ve always let the ops team worry about setting up environments, etc., I&#8217;ve now learned that there are a lot of different concerns to think about. One [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=173&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of setting up my very first production server using Ubuntu, and I&#8217;ve ended up spending a lot of time reading about security online.  Since I&#8217;ve always let the ops team worry about setting up environments, etc., I&#8217;ve now learned that there are a lot of different concerns to think about.</p>
<p>One decision in particular is bugging me right now &#8211; how to secure the root account on my new machine? <span id="more-173"></span> So far, I&#8217;ve been doing a lot of the work by SSHing into the root account.  On the whole, this doesn&#8217;t seem so great, since it can be dangerous to use root day-to-day and always have the ability to delete anything on the system.</p>
<p>Ubuntu recommends that I create another user with sudo permission and use that day-to-day.  However, since Ubuntu also asks users for their own password when using sudo (rather than the root password), I feel this isn&#8217;t intrinsically any more secure than just having a root account.  In either case, a cracker would only have to find one password to take over the system.</p>
<p>So, my thought is to create a second user with sudo permission, change sudo to require the use of the root password, and disable remote logins for root.</p>
<p>Advantages:</p>
<ul>
<li>To gain access to root, a hacker would have to find the second username, that username&#8217;s password, and the root password.</li>
<li>Sudo provides logging of all executed commands.</li>
<li>Using the sudoers file, I could potentially mark some commands as offline to even the secondary user.  This could be useful to make sure the user can&#8217;t change the root password or access certain directories.</li>
</ul>
<p>Disadvantages:</p>
<ul>
<li>Since I don&#8217;t have local access to my machine, I&#8217;m worried about turning off SSH access to root.  What if something happens to the secondary user?  Would I be locked out?  I&#8217;m using Linode as my host, so I think I might actually be able to use their online Lish terminal to log in as root as if it were local access.</li>
<li>Every admin user would need to know the root password in order to use sudo.  I think this is ok because I&#8217;ll really only have one admin user, and that will be me.</li>
</ul>
<p>In all, I think that the advantages of my plan outweigh the disadvantages.  What do you think?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mpdaugherty.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mpdaugherty.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mpdaugherty.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mpdaugherty.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mpdaugherty.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mpdaugherty.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mpdaugherty.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mpdaugherty.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mpdaugherty.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mpdaugherty.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mpdaugherty.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mpdaugherty.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mpdaugherty.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mpdaugherty.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mpdaugherty.com&amp;blog=1126752&amp;post=173&amp;subd=mpdaugherty&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mpdaugherty.com/2009/11/01/root-access-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1789bf112f20b2b53047372a84803581?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
	</channel>
</rss>
