<?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>Them Works</title>
	<atom:link href="http://themworks.com/feed" rel="self" type="application/rss+xml" />
	<link>http://themworks.com</link>
	<description>How do you like them works?</description>
	<lastBuildDate>Tue, 07 Feb 2012 20:55:00 +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>Rolling out a Tesseract OCR web service.</title>
		<link>http://themworks.com/archives/90</link>
		<comments>http://themworks.com/archives/90#comments</comments>
		<pubDate>Tue, 07 Feb 2012 02:17:39 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=90</guid>
		<description><![CDATA[HP Labs started developing an OCR engine back in 1985 and it took them 10 years before they abandoned it, just to be picked up by Google to release it as open source. It&#8217;s called Tesseract and it turns out &#8230; <a href="http://themworks.com/archives/90">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>HP Labs started developing an OCR engine back in 1985 and it took them 10 years before they abandoned it, just to be picked up by Google to release it as open source.</p>
<p>It&#8217;s called Tesseract and it turns out it&#8217;s really easy to install it on a Linux server (if you have root privileges) and put together a simple CGI script to serve it over the web.</p>
<p>Here&#8217;s how you do it:</p>
<p>1. Go to <a href="http://code.google.com/p/tesseract-ocr/wiki/ReadMe">tesseract-ocr readme</a> and find Installation Notes &#8211; Tesseract 3.01. Follow the instructions for Linux. There&#8217;s many dependencies and it takes quite some time to install them, get yourself a beer or some nuts for company.</p>
<p>I had some issues with TESSDATA_PREFIX and since I only needed english, I moved <code>eng.traineddata</code> file from <code>tessdata</code> folder to <code>/usr/local/bin/tesseract/</code> (where the tesseract is installed).</p>
<p>2. If you don&#8217;t have it proceed to <a href="http://httpd.apache.org/docs/2.1/install.html">Compiling and Installing &#8211; Apache HTTP Server</a>.</p>
<p>3. Create a file in <code>cgi-bin</code> inside of your apache installation, name it <code>ocr.cgi</code> and populate with following code:<br />
<code><br />
#!/bin/sh<br />
TES=/usr/local/bin/tesseract<br />
OCR=/home/econofy/ocr<br />
FILE=$1<br />
EXT=${FILE##*.}<br />
echo Content-type: text/plain<br />
echo ""<br />
wget -O $OCR/wget.$EXT $1<br />
if [ -x $TES ]<br />
then<br />
$TES $OCR/wget.$EXT $OCR/wget -l eng<br />
cat $OCR/wget.txt<br />
rm $OCR/wget.txt<br />
else<br />
echo Tesseract not found<br />
fi<br />
</code></p>
<p>Now, you&#8217;re ready to test if it works. Just pass a url of some picture, whether it&#8217;s png, jpeg or tiff to your cgi script. Here&#8217;s a picture I used &#8211; <img src="http://sandeen.net/wordpress/wp-content/uploads/2010/03/hostpoint-energyguide.png" alt="energy guide" width="565" height="775" /></p>
<p>Here&#8217;s how it looks like on my end (you might still find <a href="http://hack1.cloudmine.me:8010/cgi-bin/ocr.cgi?http://sandeen.net/wordpress/wp-content/uploads/2010/03/hostpoint-energyguide.png">this</a> on a Rackspace server generously provided by Cloudmine&#8217;s Ilya Braude):</p>
<blockquote><p>Tesseract Open Source OCR Engine v3.02 with Leptonica<br />
U S Government Federal law prohibits removal otthis label before consumer purchase.</p>
<p>EHERCI GUIDE</p>
<p>Refrigerator-Freezer Modelts): HTJ17BBT, HTJ17CBT,<br />
- Automatic Defrost HTH17CBT<br />
- Top-Mounted Freezer Capacity:16.5 Cubic Feet<br />
- Without Through-the-Door Ice</p>
<p>Estimated Yearly Operating Cost</p>
<p>! I I I I</p>
<p>$42 $52<br />
Cost Range of Similar Models</p>
<p>The estimated yearly operating cost of this model was<br />
not available at the time the range was published.</p>
<p>324kWh</p>
<p>Estimated Yearly Electricity Use</p>
<p>Your cost will depend on your utility rates and use.</p>
<p>I Cost range based only on models of similar capacity with automatic defrost,<br />
top-mounted freezer, and without through-the-door ice</p>
<p>I Estimated operating cost based on a 2007 national average electricity cost<br />
of 10.65 cents per kWh.</p>
<p>F f t . &#8216;t ft. I I&#8221; . -<br />
I or morein orma ion visi www cgovappiances 197Da23aP003 ENERGYS-I-AR</p>
<p>£1</p></blockquote>
<p>Far from perfect, heh? I&#8217;m going to explore the configuration settings and let you know how it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/90/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advice, like youth, probably just wasted on the young</title>
		<link>http://themworks.com/archives/82</link>
		<comments>http://themworks.com/archives/82#comments</comments>
		<pubDate>Mon, 30 Jan 2012 21:53:20 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=82</guid>
		<description><![CDATA[This was the title of a column written by Mary Schmich and published in the Chicago Tribune in 1997. Every time I see it somewhere, I think, &#8216;Oh no, not again&#8217;. I once heard it on the radio, in Russian. If &#8230; <a href="http://themworks.com/archives/82">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This was the title of a column written by Mary Schmich and published in the Chicago Tribune in 1997. Every time I see it somewhere, I think, &#8216;Oh no, not again&#8217;. I once heard it on the radio, in Russian. If I start reading it though, I understand why it gets copied over and over.</p>
<p>Here it goes:</p>
<p>&#8220;Ladies and gentlemen of the class of &#8217;97:</p>
<p>Wear sunscreen.</p>
<p>If I could offer you only one tip for the future, sunscreen would be it. The long-term benefits of sunscreen have been proved by scientists, whereas the rest of my advice has no basis more reliable than my own meandering experience. I will dispense this advice now.</p>
<p>Enjoy the power and beauty of your youth. Oh, never mind. You will not understand the power and beauty of your youth until they&#8217;ve faded. But trust me, in 20 years, you&#8217;ll look back at photos of yourself and recall in a way you can&#8217;t grasp now how much possibility lay before you and how fabulous you really looked. You are not as fat as you imagine.</p>
<p>Don&#8217;t worry about the future. Or worry, but know that worrying is as effective as trying to solve an algebra equation by chewing bubble gum. The real troubles in your life are apt to be things that never crossed your worried mind, the kind that blindside you at 4 pm on some idle Tuesday.</p>
<p>Do one thing every day that scares you.</p>
<p>Sing.</p>
<p>Don&#8217;t be reckless with other people&#8217;s hearts. Don&#8217;t put up with people who are reckless with yours.</p>
<p>Floss.</p>
<p>Don&#8217;t waste your time on jealousy. Sometimes you&#8217;re ahead, sometimes you&#8217;re behind. The race is long and, in the end, it&#8217;s only with yourself.</p>
<p>Remember compliments you receive. Forget the insults. If you succeed in doing this, tell me how.</p>
<p>Keep your old love letters. Throw away your old bank statements.</p>
<p>Stretch.</p>
<p>Don&#8217;t feel guilty if you don&#8217;t know what you want to do with your life. The most interesting people I know didn&#8217;t know at 22 what they wanted to do with their lives. Some of the most interesting 40-year-olds I know still don&#8217;t.</p>
<p>Get plenty of calcium. Be kind to your knees. You&#8217;ll miss them when they&#8217;re gone.</p>
<p>Maybe you&#8217;ll marry, maybe you won&#8217;t. Maybe you&#8217;ll have children, maybe you won&#8217;t. Maybe you&#8217;ll divorce at 40, maybe you&#8217;ll dance the funky chicken on your 75th wedding anniversary. Whatever you do, don&#8217;t congratulate yourself too much, or berate yourself either. Your choices are half chance. So are everybody else&#8217;s. Enjoy your body. Use it every way you can. Don&#8217;t be afraid of it or of what other people think of it. It&#8217;s the greatest instrument you&#8217;ll ever own.</p>
<p>Dance, even if you have nowhere to do it but your living room. Read the directions, even if you don&#8217;t follow them. Do not read beauty magazines. They will only make you feel ugly.</p>
<p>Get to know your parents. You never know when they&#8217;ll be gone for good. Be nice to your siblings. They&#8217;re your best link to your past and the people most likely to stick with you in the future.</p>
<p>Understand that friends come and go, but with a precious few you should hold on. Work hard to bridge the gaps in geography and lifestyle, because the older you get, the more you need the people who knew you when you were young.</p>
<p>Live in New York City once, but leave before it makes you hard. Live in Northern California once, but leave before it makes you soft. Travel.</p>
<p>Accept certain inalienable truths: Prices will rise. Politicians will philander. You, too, will get old. And when you do, you&#8217;ll fantasize that when you were young, prices were reasonable, politicians were noble, and children respected their elders.</p>
<p>Respect your elders.</p>
<p>Don&#8217;t expect anyone else to support you. Maybe you have a trust fund. Maybe you&#8217;ll have a wealthy spouse. But you never know when either one might run out.</p>
<p>Don&#8217;t mess too much with your hair or by the time you&#8217;re 40 it will look 85.</p>
<p>Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia. Dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than it&#8217;s worth. But trust me on the sunscreen.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/82/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing pip, package installer for Python, on Mac.</title>
		<link>http://themworks.com/archives/80</link>
		<comments>http://themworks.com/archives/80#comments</comments>
		<pubDate>Sat, 28 Jan 2012 05:15:30 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=80</guid>
		<description><![CDATA[In my last post on Installing memcached for Django I mentioned pip as a very easy way to install python-memcached, a module I use with Django to enable caching of the dynamic content. Before pip installation you have to make &#8230; <a href="http://themworks.com/archives/80">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my last post on <a href="http://themworks.com/archives/75">Installing memcached for Django</a> I mentioned <a href="http://pypi.python.org/pypi/pip">pip</a> as a very easy way to install python-memcached, a module I use with Django to enable caching of the dynamic content.</p>
<p>Before pip installation you have to make sure you have <a href="http://pypi.python.org/pypi/distribute">distribute</a> on your system. Here&#8217;s how to install it, given that you have python (remember, you don&#8217;t need to type the dollar sign in the terminal):<br />
<code><br />
$ curl http://python-distribute.org/distribute_setup.py | python<br />
</code></p>
<p>Once the installation script is done, go ahead for the next one:<br />
<code><br />
$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python<br />
</code></p>
<p>Super easy! Now get yourself some ice cream.</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/80/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing memcached for Django</title>
		<link>http://themworks.com/archives/75</link>
		<comments>http://themworks.com/archives/75#comments</comments>
		<pubDate>Fri, 27 Jan 2012 04:10:13 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=75</guid>
		<description><![CDATA[Memcached is very popular caching system with API available for many languages and environments. Today I installed it on my OS X development server that runs Django. These instructions might be helpful if you&#8217;re up to the same task. Memcached &#8230; <a href="http://themworks.com/archives/75">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://memcached.org/">Memcached</a> is very popular caching system with API available for many languages and environments. Today I installed it on my OS X development server that runs <a href="https://www.djangoproject.com/">Django</a>. These instructions might be helpful if you&#8217;re up to the same task.</p>
<p>Memcached needs an event notification library <a href="http://libevent.org/">libevent</a> to run. After downloading <a href="https://github.com/libevent/libevent/zipball/master">the source code</a> from libevent public repository go ahead and unpack it. Open terminal in the folder you have unpacked the source code and type<br />
<code><br />
./autogen.sh<br />
./configure<br />
make<br />
make verify<br />
sudo make install<br />
</code><br />
This should be it for libevent.</p>
<p>Now to the memcached.<br />
<code><br />
curl -O http://memcached.org/latest<br />
tar -zxvf memcached-1.x.x.tar.gz<br />
cd memcached-1.x.x<br />
./configure<br />
make &amp;&amp; make test<br />
sudo make install<br />
</code></p>
<p>And last but not least you will need Python-memcached installed. It&#8217;s very easy if you have <a href="http://pypi.python.org/pypi/pip">pip</a> and I highly recommend getting it if you don&#8217;t. Here&#8217;s the line<br />
<code><br />
pip install python-memcached<br />
</code></p>
<p>This is really easy if you don&#8217;t run into errors. Which I did when I tried to install it on a hosted server. I didn&#8217;t get past &#8216;make verify&#8217; command for the libevent. I&#8217;ll have to do some digging and I will give you a report on my progress. Keep reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/75/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Before you buy, Econofy.</title>
		<link>http://themworks.com/archives/65</link>
		<comments>http://themworks.com/archives/65#comments</comments>
		<pubDate>Tue, 24 Jan 2012 03:36:28 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=65</guid>
		<description><![CDATA[It&#8217;s been a wonderful weekend. I&#8217;m very thankful to guys at CleanWebHack and all the sponsors. It all started in April 2011 on Pachube International Internet of Things Hackathon. Will Wagner came up with an idea of quantifying a living &#8230; <a href="http://themworks.com/archives/65">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a wonderful weekend. I&#8217;m very thankful to guys at <a href="http://cleanwebhack.com/hackathon/">CleanWebHack</a> and all the sponsors.</p>
<p>It all started in April 2011 on <a href="http://community.pachube.com/iot_hackathon">Pachube International Internet of Things Hackathon</a>. Will Wagner came up with an idea of quantifying a living space in terms of energy consumption and finding ways to improve. He was there with his friends Brandon and Paul, whom I met at <a href="http://www.meetup.com/nyhacker/">nyhacker townhall event</a> and I jumped in. We ended up as a single team to finish the hackathon in NYC (it was really big in London as we saw through a video conference call.) Even though we had a working app after 15 hours of non-stop hacking and coding, it wasn&#8217;t enough to see that Econofy&#8217;s great potential.<br />
<img class="alignnone size-large wp-image-67" title="econofylayoutalpha" src="http://themworks.com/wp-content/uploads/2012/01/econofyliayout-1024x768.png" alt="econofylayoutalpha" width="584" height="438" /></p>
<p>Later we decided to use Amazon Advertising API to get hand on the wide range of appliances and electronics. Will put a lot of time in scraping the Energy Star spreadsheets to get the data on their energy efficiency. It was getting somewhere, but something was missing. Some glue that holds it together.</p>
<p>After a few google chat brainstorm we settled to implement star ratings for products based on their energy efficiency and roll out the ROI analysis some bits and pieces of which we already had in the codebase.</p>
<div id="attachment_68" class="wp-caption alignnone" style="width: 180px"><img class="size-full wp-image-68" title="Screen shot 2012-01-23 at 10.14.24 PM" src="http://themworks.com/wp-content/uploads/2012/01/Screen-shot-2012-01-23-at-10.14.24-PM.png" alt="e-star" width="170" height="35" /><p class="wp-caption-text">2.9 e-stars</p></div>
<p><img class="alignnone size-full wp-image-70" title="ROIanalysis" src="http://themworks.com/wp-content/uploads/2012/01/Screen-shot-2012-01-23-at-10.21.14-PM1-e1327375703141.png" alt="ROIanalysis" width="493" height="540" /></p>
<p>Now we have humongous amount of work to do and it&#8217;s best news for me. Econofy won an audience award and best overall award of CleanWebHack, which means that it is something that people actually want to have. And we really want to build it.</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/65/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing WordPress on a Mac over SSH, Part 2.</title>
		<link>http://themworks.com/archives/58</link>
		<comments>http://themworks.com/archives/58#comments</comments>
		<pubDate>Fri, 20 Jan 2012 16:20:33 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=58</guid>
		<description><![CDATA[If you followed Installing WordPress on a Mac over SSH but for some reason you need to have 2 or more blogs hosted, this post is for you. If something is not working as you&#8217;d expect take a look at &#8230; <a href="http://themworks.com/archives/58">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you followed <a title="Installing WordPress on a Mac over SSH" href="http://themworks.com/archives/4">Installing WordPress on a Mac over SSH</a> but for some reason you need to have 2 or more blogs hosted, this post is for you.</p>
<p>If something is not working as you&#8217;d expect take a look at <a title="Installing Multiple Blogs" href="http://codex.wordpress.org/Installing_Multiple_Blogs">Installing Multiple Blogs</a> at the <a href="http://codex.wordpress.org/">WordPress Codex</a> for additional reference.</p>
<p>Using instructions from the first part go through steps 1 and 2 to get a new installation of wordpress. It may sound counterintuitive but that&#8217;s the way you do it, a new installation for every new blog.</p>
<p>Now instead of creating a new config file from the sample and editing it, you can copy an existing one. There&#8217;s a trick though, you have to edit the table prefix, so your new installation knows what tables in the database it needs to create and use.<br />
<code><br />
cp ~/Sites/existing_blog/wp-config.php ~/Sites/new_blog/<br />
vi ~/Sites/new_blog/wp-config.php<br />
</code></p>
<p>Once in the editor (use your editor of choice if you&#8217;re not familiar with vi), find <code>$table_prefix</code> and replace <code>wp_</code> with something that your new blog will use. I replaced it with <code>bd_</code> for a friend&#8217;s <a href="http://bopdigger.com">bopdigger | Thoughts on Improvisation and Music</a> blog.</p>
<p>When you&#8217;re done with configuration go ahead with the step 4 to edit hosts file and virtual hosts for Apache. You won&#8217;t need step 5 as you already have the user and database set up. Last step is changing the DNS records and you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/58/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who burst the Clean Energy Bubble of the 2000s and what do we do now.</title>
		<link>http://themworks.com/archives/56</link>
		<comments>http://themworks.com/archives/56#comments</comments>
		<pubDate>Fri, 20 Jan 2012 05:08:42 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=56</guid>
		<description><![CDATA[I just got a new issue of Wired and have read an article on renewable energy. Turns out a lot of people (mostly rich people, so no worries here) lost money pursuing dreams of clean energy. None of the favorites &#8230; <a href="http://themworks.com/archives/56">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just got a new issue of Wired and have read an article on renewable energy. Turns out a lot of people (mostly rich people, so no worries here) lost money pursuing dreams of clean energy. None of the favorites of this race &#8211; Solar, Wind, Algae, Biofuels, Fuel cells &#8211; crossed the finish line first. The one that did was Natural Gas.</p>
<p>Natural gas is not renewable in conventional sense of the word. But it is much than oil and coal. And it turns out 24% of US electricity comes from natural gas. It&#8217;s also a most popular heating source.</p>
<p>A few interesting things about natural gas -</p>
<p><strong>Shale gas</strong><br />
Recently US became a leader in production of shale gas. Experts say the drilling companies exaggerate the benefits and potential, but it looks pretty good &#8211; they say the whole country could be powered for 100 years on the shale gas alone.</p>
<p>Here are some projected basins (worldwide, but some countries are not included in the report) &#8211; <img src="http://upload.wikimedia.org/wikipedia/commons/7/7f/Large_new-map.png" alt="shale gas" width="540" height="296" /></p>
<p>Edit: as pointed out by William, the shale gas is very bad for water resources.</p>
<p><strong>CNG-powered vehicles</strong><br />
Those are cool. Both my dad and my brother had converted their cars at the beginning of the 2000s to run on natural gas as well as on petroleum. And it was in Russia. There weren&#8217;t many filling stations but it was cheaper and cleaner. I always wondered why this thing never took off in the US.</p>
<p>There is more then hundred thousands buses here that run on natural gas though &#8211; <img src="http://upload.wikimedia.org/wikipedia/commons/b/bc/Metrobus_powered_with_CNG_5198_DCA_03_2009.jpg" alt="CNG powered bus" width="569" height="380" /></p>
<p><strong>Escaping gas</strong><br />
Technology is seldom perfectly efficient and we don&#8217;t get all the gas that&#8217;s out there and we can&#8217;t use it all for good cause. Some gas will escape.</p>
<p>There&#8217;s always gas where oil is. When the oil is the main target, a lot of natural gas gets wasted. There&#8217;s also blowouts (or gushers). One of the worst gushers happened in 1985 in Atyrau, Kazakh SSR, Soviet Union erupting about 60 bln cubic feet of natural gas. I pay one buck for a cubic feet to heat my home.</p>
<p><strong>Summary</strong><br />
Although I believe in renewable and clean energy I propose we don&#8217;t loose focus on the old sources of energy and make them more efficient while making the energy consumption smarter. Let&#8217;s innovate both for tomorrow and for today.</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/56/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>If This Then That.</title>
		<link>http://themworks.com/archives/49</link>
		<comments>http://themworks.com/archives/49#comments</comments>
		<pubDate>Wed, 18 Jan 2012 03:31:39 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=49</guid>
		<description><![CDATA[If you knew about a new post on my blog from twitter, it&#8217;s because of this - If you came here from facebook, it&#8217;s due to a task that I created on ifttt.com that looks like this - Thanks to &#8230; <a href="http://themworks.com/archives/49">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you knew about a new post on my blog from twitter, it&#8217;s because of this -</p>
<p><img class="alignright size-full wp-image-50" title="ifttt" src="http://themworks.com/wp-content/uploads/2012/01/Screen-shot-2012-01-17-at-10.00.00-PM.png" alt="ifttt" width="595" height="176" /></p>
<p>If you came here from facebook, it&#8217;s due to a task that I created on <a title="ifttt.com" href="http://ifttt.com">ifttt.com</a> that looks like this -</p>
<p><img class="alignright size-full wp-image-51" title="ifttt-fb" src="http://themworks.com/wp-content/uploads/2012/01/Screen-shot-2012-01-17-at-10.02.29-PM.png" alt="ifttt-fb" width="591" height="168" /></p>
<p>Thanks to IfThisThenThat I can connect my Instagram to my Dropbox, get emails about expected precipitation (gets quite handy when you ride a motorcycle to work), get a text message when something rare comes up on craigslist (like a first generation Honda Insight with a CVT transmission).</p>
<p>You can create your own tasks or use <a title="recipes" href="http://ifttt.com/recipes">recipes</a> made by others. My favorites are <a title="Text to escape" href="http://ifttt.com/recipes/365">Text to escape</a>, <a title="Note to self" href="http://ifttt.com/recipes/635">Note to self</a> and <a href="http://ifttt.com/recipes/1828">Help me find my lost phone!</a></p>
<p>I haven&#8217;t been able to hook it up with the stocks yet. Also, after I set it up to thank all my new followers on Twitter, I found that those are mostly bots.</p>
<p>What do you use ifttt.com for?</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/49/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Praise the dd, I saw the light. Cloning disks with Linux and dd.</title>
		<link>http://themworks.com/archives/37</link>
		<comments>http://themworks.com/archives/37#comments</comments>
		<pubDate>Tue, 17 Jan 2012 03:19:15 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=37</guid>
		<description><![CDATA[I saw the light, I saw the light, No more darkness, no more night&#8230; - Hank Williams, &#8220;I saw the light&#8221; I consider myself a lucky fellow. But not until today it extended to relationships with hard drives. They always &#8230; <a href="http://themworks.com/archives/37">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p>I saw the light, I saw the light,<br />
No more darkness, no more night&#8230;<br />
- Hank Williams, &#8220;I saw the light&#8221;</p></blockquote>
<p>I consider myself a lucky fellow. But not until today it extended to relationships with hard drives. They always failed me. And some of you might know The Cloud wasn&#8217;t always around.</p>
<p>Last week I was asked to rescue a couple of computers with soon-to-die HDD&#8217;s. I had a thumb drive with Clonezilla Live on it and I tried to clone them. It would go very slow, showing somewhat around 400kb/s (?) and then spur a lot of text in the command line finally freezing the system.</p>
<p><a href="http://themworks.com/wp-content/uploads/2012/01/photo-1.jpg"><img class="alignright size-full wp-image-39" title="clonezilla errors" src="http://themworks.com/wp-content/uploads/2012/01/photo-1.jpg" alt="clonezilla errors" width="640" height="478" /></a></p>
<p>Last friday before calling it a day I tried to boot from one of the original drives and it didn&#8217;t go. I had assumed the Clonezilla ruined it somehow and decided not to fiddle with mechanical disk drives again.</p>
<p>Today I found a copy of Ubuntu Live on another thumb drive and decided to give dd a try. I&#8217;ve read <a href="http://serverfault.com/questions/4906/using-dd-for-disk-cloning">Using DD for disk cloning</a> a while ago and I have played with copying blocks from a disk or /dev/random to /dev/null, but never had a chance to clone physical hard drives. It really turned out to be as easy as typing in terminal the following command<br />
<code><br />
dd if=/dev/sda of=/dev/sdb<br />
</code></p>
<p>You might need to put <code>sudo</code> in front of it if you&#8217;re not root. Most importantly, you have to double check that <code>if</code> (input file) and <code>of</code> (output file) are not misplaced. ALL DATA on sdb will be lost (technically, if sdb is bigger than sda, some of the data will remain, but that&#8217;s not what you&#8217;re aiming for.) To check which drive is source and which should be target go back to terminal and use hdparm<br />
<code><br />
hdparm -i /dev/sda<br />
hdparm -i /dev/sdb<br />
</code></p>
<p>This should give you enough information to identify the drives. By the way, your disks could be different from sda and sdb. To find out what they are type<br />
<code><br />
fdisk -l<br />
</code></p>
<p>When you finally decide to hit enter and launch dd you might begin to wonder, why there&#8217;s no progress indication. Don&#8217;t worry. There&#8217;s an app for that. Just open another Terminal window and use<br />
<code><br />
ps -a | grep dd<br />
</code><br />
to get an Id of dd&#8217;s process. In my case it was 5643. Replace $pid with this value in the next command<br />
<code><br />
watch -n 10 $pid<br />
</code><br />
and you&#8217;re good to go. Every ten seconds dd will report on its progress.</p>
<p><a href="http://themworks.com/wp-content/uploads/2012/01/photo-3.jpg"><img class="alignright size-full wp-image-38" title="dd progress" src="http://themworks.com/wp-content/uploads/2012/01/photo-3.jpg" alt="dd progress" width="640" height="478" /></a></p>
<p>There&#8217;s more tricks behind the dd&#8217;s belt. I used <code>bs=8096</code> and <code>conv=noerror</code> arguments when I ran it, but I&#8217;m not sure how it affected the outcome. Next time I&#8217;m going to try to pipe it to itself for a speedup. As an asymmetrical copying program, dd reads first, then writes, then repeats. Supposedly you can gain 100% in performance if copying symmetrically, like this<br />
<code><br />
dd if=/dev/sda | dd of=/dev/sdb<br />
</code></p>
<p>I hope you&#8217;re now ready to join the club of dd believers.</p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/37/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PureFTPd on Snow Leopard</title>
		<link>http://themworks.com/archives/29</link>
		<comments>http://themworks.com/archives/29#comments</comments>
		<pubDate>Sat, 14 Jan 2012 20:28:25 +0000</pubDate>
		<dc:creator>ivanivan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://themworks.com/?p=29</guid>
		<description><![CDATA[I&#8217;ve spoken before about Installing WordPress on a Mac over SSH, and if you have an older mac with Leopard or Snow Leopard acting as a web server you might set it up to serve ftp as well. Unfortunately, OS &#8230; <a href="http://themworks.com/archives/29">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spoken before about <a href="http://themworks.com/archive/4">Installing WordPress on a Mac over SSH</a>, and if you have an older mac with Leopard or Snow Leopard acting as a web server you might set it up to serve ftp as well.</p>
<p>Unfortunately, OS X&#8217;s built-in ftp server lacks in functionality and flexibility even if you have a server edition of the OS. Fortunately, there&#8217;s an open source alternative. It&#8217;s called pureFTPd.</p>
<p>There&#8217;s a similar blog post &#8211; <a href="http://2blog.kreme.com/2009/471-pureftp">pureFTPd and Snow Leopard</a>. It gave me some insight but there&#8217;s many flaws in the instructions. Let me try to improve on it.</p>
<p>If you don&#8217;t have <a href="http://www.macports.org/">MacPorts</a> go ahead and install it. It&#8217;s a very useful tool. Once you&#8217;re done with that, type<br />
<code><br />
sudo port install pure-ftpd<br />
</code><br />
in terminal. It tells you to test the server with &#8220;ftp localhost&#8221;, don&#8217;t do it just yet. First you now need to set up the users and the start the server (this is the recommended way)<br />
<code><br />
pure-ftpd &amp;<br />
</code></p>
<p>Now we need to add a user in OS X Preferences Accounts Pane. Make sure you choose Sharing Only from the pick list.<br />
<img src="http://themworks.com/images/ftpuser.png" alt="Adding FTP User " width="539" height="430" /></p>
<p>PureFTPd has a great support for virtual users, which means you don&#8217;t need to add system users to allow for more ftp accounts. Here&#8217;s <a href="http://download.pureftpd.org/pub/pure-ftpd/doc/README.Virtual-Users">a reference</a> from pureFTPd documentation. To add a virtual user go back to terminal and type<br />
<code><br />
sudo pure-pw useradd testuser -u ftpuser -d /Users/ftpuser/testuser<br />
</code><br />
You will be asked for a password twice. Note, you might need to replace ftpuser with your own value you chose when creating a system user. Also, the user is not actually added until you commit your changes. Here&#8217;s how you do it<br />
<code><br />
sudo pure-pw mkdb<br />
</code><br />
You should be good to go now. Let me know if you have any problems running pureFTPd on Snow Leopard. </p>
]]></content:encoded>
			<wfw:commentRss>http://themworks.com/archives/29/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

