<?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>Zach Dwiel &#187; fyi</title>
	<atom:link href="http://dwiel.net/blog/category/fyi/feed/" rel="self" type="application/rss+xml" />
	<link>http://dwiel.net</link>
	<description>Repository of code snippits and ideas</description>
	<lastBuildDate>Fri, 06 Jan 2012 03:36:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>service error when starting mongodb</title>
		<link>http://dwiel.net/blog/service-error-when-starting-mongodb/</link>
		<comments>http://dwiel.net/blog/service-error-when-starting-mongodb/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 13:12:45 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[fyi]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=335</guid>
		<description><![CDATA[I was trying to start mongodb just now and couldn't understand why it wasn't working. Turns out I needed to be sudo - not the most clear error message ... &#160; $ service mongodb start start: Rejected send message, 1 matched rules; type=&#34;method_call&#34;, sender=&#34;:1.11 212&#34; &#40;uid=1000 pid=1360 comm=&#34;start) interface=&#34;com.ubuntu.Upstart0_6.Job&#34; membe r=&#34;Start&#34; error name=&#34;&#40;unset&#41;&#34; requested_reply=0 destination=&#34;com.ubuntu.Upstart [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to start mongodb just now and couldn't understand why it wasn't working.  Turns out I needed to be sudo - not the most clear error message ...</p>
<pre class="bash">&nbsp;
$ service mongodb start
start: Rejected send message, <span style="color: #000000;">1</span> matched rules; <span style="color: #007800;">type=</span><span style="color: #ff0000;">&quot;method_call&quot;</span>, <span style="color: #007800;">sender=</span><span style="color: #ff0000;">&quot;:1.11
212&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">uid=</span><span style="color: #000000;">1000</span> <span style="color: #007800;">pid=</span><span style="color: #000000;">1360</span> <span style="color: #007800;">comm=</span><span style="color: #ff0000;">&quot;start) interface=&quot;</span>com.ubuntu.Upstart0_6.Job<span style="color: #ff0000;">&quot; membe
r=&quot;</span>Start<span style="color: #ff0000;">&quot; error name=&quot;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">unset</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">&quot; requested_reply=0 destination=&quot;</span>com.ubuntu.Upstart
<span style="color: #ff0000;">&quot; (uid=0 pid=1 comm=&quot;</span>/sbin/init<span style="color: #ff0000;">&quot;))
$ sudo service mongodb start
mongodb start/running, process 1326
</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/service-error-when-starting-mongodb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04 on Thinkpad T420s</title>
		<link>http://dwiel.net/blog/ubuntu-11-04-on-thinkpad-t420s/</link>
		<comments>http://dwiel.net/blog/ubuntu-11-04-on-thinkpad-t420s/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 15:00:01 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[fyi]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=329</guid>
		<description><![CDATA[Just bought this thinkpad 420s. The first thing I did when I got it was install Ubuntu 11.04 on it. Most everything worked on first install, including things which many people seemed to have problems with on the forums. Working: Displays work fine with 3d effects and everything (dual monitor with and without docking station) [...]]]></description>
			<content:encoded><![CDATA[<p>Just bought <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16834246117" title="this">this</a> thinkpad 420s.  The first thing I did when I got it was install Ubuntu 11.04 on it.  Most everything worked on first install, including things which many people seemed to have problems with on the forums.</p>
<h3>Working:</h3>
<ul>
<li>Displays work fine with 3d effects and everything (dual monitor with and without docking station) (Intel HD Graphics 3000)
<li>Built in speakers and headphone jack both work
<li>Built-in mic and web-cam both work - I used skype and google hangouts and both worked flawlessly.
<li>wireless worked with my open network connection (I haven't yet tried it on secure networks)
<li>Bay battery seems to work.
</ul>
<h3>Not Working:</h3>
<ul>
<li>Audio output on docking station
<li>Dual Displays sometimes reset to showing the same image on both rather than two seperate displays.  This has always been fixed by reseting the settings in the Monitor configuration page.
</ul>
<p>I am impressed with how flawless the install was.  I was dreading it because last time I did this on my last laptop 4 years ago, I spent a few hours getting everything in working order.  So far I have not yet had to do any custom installation.  Everything that I needed working, worked out of the box!</p>
<p>Let me know if you want me to test anything out and I'll try if I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/ubuntu-11-04-on-thinkpad-t420s/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>python random timezone</title>
		<link>http://dwiel.net/blog/python-random-timezone/</link>
		<comments>http://dwiel.net/blog/python-random-timezone/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 01:44:46 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[fyi]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=302</guid>
		<description><![CDATA[&#160; import random import pytz &#160; pytz.timezone&#40;random.choice&#40;pytz.all_timezones&#41;&#41; &#160;]]></description>
			<content:encoded><![CDATA[<pre class="python">&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">random</span>
<span style="color: #ff7700;font-weight:bold;">import</span> pytz
&nbsp;
pytz.<span style="color: black;">timezone</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">random</span>.<span style="color: black;">choice</span><span style="color: black;">&#40;</span>pytz.<span style="color: black;">all_timezones</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/python-random-timezone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python-memcache is thread safe</title>
		<link>http://dwiel.net/blog/python-memcache-is-thread-safe/</link>
		<comments>http://dwiel.net/blog/python-memcache-is-thread-safe/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 05:53:34 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[fyi]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=296</guid>
		<description><![CDATA[python-memcache is a thread safe library. In memcache.py, which is the single source file, you'll find: &#160; try: # Only exists in Python 2.4+ from threading import local except ImportError: # TODO: add the pure-python local implementation class local&#40;object&#41;: pass class Client&#40;local&#41;: ... &#160; Which means that all data accessed through self.variable_name have values which [...]]]></description>
			<content:encoded><![CDATA[<p>python-memcache is a thread safe library.  In memcache.py, which is the single source file, you'll find:</p>
<pre class="python">&nbsp;
<span style="color: #ff7700;font-weight:bold;">try</span>:
    <span style="color: #808080; font-style: italic;"># Only exists in Python 2.4+</span>
    <span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">threading</span> <span style="color: #ff7700;font-weight:bold;">import</span> local
<span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">ImportError</span>:
    <span style="color: #808080; font-style: italic;"># TODO:  add the pure-python local implementation</span>
    <span style="color: #ff7700;font-weight:bold;">class</span> local<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">pass</span>
<span style="color: #ff7700;font-weight:bold;">class</span> Client<span style="color: black;">&#40;</span>local<span style="color: black;">&#41;</span>:
  ...
&nbsp;</pre>
<p>Which means that all data accessed through self.variable_name have values which are thread specific (as long as you are running python version 2.4 or higher.)  Very cool.  Before I looked at the code, I wrote some multi-threaded tests to check and see if anything fishy would happen.  I'd say looking at the code is a better solution.</p>
<p>more details <a href="http://docs.python.org/library/threading.html#threading.local">threading.local</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/python-memcache-is-thread-safe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mongorestore: ERROR: root directory must be a dump of a single collection when specifying a collection name with &#8211;collection</title>
		<link>http://dwiel.net/blog/mongorestore-error-root-directory-must-be-a-dump-of-a-single-collection-when-specifying-a-collection-name-with-collection/</link>
		<comments>http://dwiel.net/blog/mongorestore-error-root-directory-must-be-a-dump-of-a-single-collection-when-specifying-a-collection-name-with-collection/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 02:20:38 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[fyi]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=195</guid>
		<description><![CDATA[mongorestore wants the specific collection's filename rather than the entire database's dump folder: dwiel@dwiel$ mongodump -d db -c variables -o ../backups/1 connected to: 127.0.0.1 DATABASE: db to ../backups/1/db &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;db.variables to ../backups/1/db/variables.bson &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;3 objects dwiel@dwiel$ mongorestore -d db -c variables --drop ../backups/1 ERROR: root directory must be a dump of a single collection &#160;&#160;&#160;&#160;&#160;&#160;&#160;when specifying a [...]]]></description>
			<content:encoded><![CDATA[<p>mongorestore wants the specific collection's filename rather than the entire database's dump folder:</p>
<style>span, strong { font-family: courier, monospace; }</style>
<p><code></p>
<div style="font-family: courier, monospace;"><strong>dwiel@dwiel$</strong><span style="color: #000000;"> </span>mongodump -d db -c variables -o ../backups/1<br />
<span style="color: #333333;">connected to: 127.0.0.1<br />
DATABASE: db	 to 	../backups/1/db<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db.variables to ../backups/1/db/variables.bson<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 objects</span><br />
<strong>dwiel@dwiel$</strong> mongorestore -d db -c variables --drop ../backups/1<br />
<span style="color: #800000;">ERROR: root directory must be a dump of a single collection<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when specifying a collection name with --collection<br />
usage: ........</span><br />
<strong>dwiel@dwiel$</strong> mongorestore -d db -c variables --drop ../backups/1/db/variables.bson<br />
<span style="color: #333333;">connected to: 127.0.0.1<br />
../backups/1/db/variables.bson<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;going into namespace [db.variables]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dropping<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3 objects</span></div>
<p></code></p>
<p>quite obvious in retrospect given the error message, but the internet didn't know the answer yet and there isn't much documentation about mongorestore.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/mongorestore-error-root-directory-must-be-a-dump-of-a-single-collection-when-specifying-a-collection-name-with-collection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL Permission Errors After Moving Datadir</title>
		<link>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/</link>
		<comments>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 03:52:11 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[fyi]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=161</guid>
		<description><![CDATA[I wanted to make space on my root partition and so moved my mysql data dir to /home/mysql in /etc/mysql/my.conf and received the following errors: dwiel@dwiel:~$ sudo mysqld 091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test 091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test 091111 20:39:16 [Note] Plugin 'FEDERATED' is disabled. mysqld: Can't find file: [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to make space on my root partition and so moved my mysql data dir to /home/mysql in /etc/mysql/my.conf and received the following errors:</p>
<p><code>dwiel@dwiel:~$ sudo mysqld<br />
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test<br />
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test<br />
091111 20:39:16 [Note] Plugin 'FEDERATED' is disabled.<br />
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)<br />
091111 20:39:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.<br />
091111 20:39:16  InnoDB: Operating system error number 13 in a file operation.<br />
InnoDB: The error means mysqld does not have the access rights to<br />
InnoDB: the directory.<br />
InnoDB: File name ./ibdata1<br />
InnoDB: File operation call: 'open'.<br />
InnoDB: Cannot continue operation.<br />
</code></p>
<p>The problem was with apparmor.  It was restricting mysql from reading and writing to /home/mysql.  To correct this I edited the file /etc/apparmor.d/usr.sbin.mysqld and added:</p>
<p><code><br />
/home/mysql r,<br />
/home/mysql** rwk,<br />
</code></p>
<p>to the end of the file.  Then restarted apparmor:</p>
<p><code><br />
sudo /etc/init.d/apparmor restart<br />
</code></p>
<p>and then restarted apache with no problem</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doing what you Love</title>
		<link>http://dwiel.net/blog/doing-what-you-love/</link>
		<comments>http://dwiel.net/blog/doing-what-you-love/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 18:28:00 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[fyi]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[love]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=90</guid>
		<description><![CDATA[Feeling down about doing what you love? watch this]]></description>
			<content:encoded><![CDATA[<p>Feeling down about doing what you love?</p>
<p>watch <a href="http://www.ted.com/index.php/talks/elizabeth_gilbert_on_genius.html">this</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/doing-what-you-love/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passwordless login for SSH not working</title>
		<link>http://dwiel.net/blog/passwordless-login-for-ssh-not-working/</link>
		<comments>http://dwiel.net/blog/passwordless-login-for-ssh-not-working/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 07:22:12 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[fyi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[passwordless]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshd]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=63</guid>
		<description><![CDATA[I have not been able to login to my system with passwordless SSH for some time now and finally figured out the problem.  I had to change the permissions of my home directory to disallow writing by everyone.  I knew that ~/.ssh and the files in it required specific permissions to be set, but I [...]]]></description>
			<content:encoded><![CDATA[<p>I have not been able to login to my system with passwordless SSH for some time now and finally figured out the problem.  I had to change the permissions of my home directory to disallow writing by everyone.  I knew that ~/.ssh and the files in it required specific permissions to be set, but I hadn't heard about the home directory having similar requirements.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/passwordless-login-for-ssh-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The psychology of the Blue Man Group</title>
		<link>http://dwiel.net/blog/the-psychology-of-the-blue-man-group/</link>
		<comments>http://dwiel.net/blog/the-psychology-of-the-blue-man-group/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 15:46:23 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[fyi]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=33</guid>
		<description><![CDATA[There is a great video over at edge about how talking about old age makes people walk slower and asking people to nod yes or no while demoing headphones influences their opinions on the headphones' quality.  I think the Blue Man Group was ahead of their time.]]></description>
			<content:encoded><![CDATA[<p>There is a great <a title="video" href="http://www.edge.org/documents/archive/edge262.html#4">video</a> over at edge about how talking about old age makes people walk slower and asking people to nod yes or no while demoing headphones influences their opinions on the headphones' quality.  I think the <a href="http://www.youtube.com/watch?v=VgS-4stj8fQ">Blue Man Group</a> was ahead of their time.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/the-psychology-of-the-blue-man-group/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

