<?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>Drew&#039;s Blog &#187; Drew Dahl</title>
	<atom:link href="http://drewdahl.com/author/drewdahl/feed/" rel="self" type="application/rss+xml" />
	<link>http://drewdahl.com</link>
	<description>A Barrage of Liquid Awesome in Geek Form</description>
	<lastBuildDate>Thu, 26 May 2011 08:43:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Firefox Plugin for Todoist</title>
		<link>http://drewdahl.com/2011/05/25/firefox-plugin-for-todoist/</link>
		<comments>http://drewdahl.com/2011/05/25/firefox-plugin-for-todoist/#comments</comments>
		<pubDate>Wed, 25 May 2011 15:39:52 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Todoist Firefox Plugin]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Todoist]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=659</guid>
		<description><![CDATA[I ran across the Firefox plug-in on Todoist&#8217;s website and noticed that they put it up on Mozilla&#8217;s add-on area. I&#8217;ve had a number of people ask me to update the altered plug-in that I released earlier; however, installing the official plug-in would be a much better idea at this point! It seems they have [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across the Firefox plug-in on Todoist&#8217;s website and noticed that they put it up on Mozilla&#8217;s add-on area.  I&#8217;ve had a number of people ask me to update the altered plug-in that I released earlier; however, installing the official plug-in would be a much better idea at this point!  It seems they have the compatibility listed as up to Firefox 6.0a, so it should be good for a while.</p>
<p>Here&#8217;s the link: <a href="https://addons.mozilla.org/en-US/firefox/addon/todoist/">https://addons.mozilla.org/en-US/firefox/addon/todoist/</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2011/05/25/firefox-plugin-for-todoist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using NetworkManager to run scripts after connecting</title>
		<link>http://drewdahl.com/2011/05/03/using-networkmanager-to-run-scripts-after-connecting/</link>
		<comments>http://drewdahl.com/2011/05/03/using-networkmanager-to-run-scripts-after-connecting/#comments</comments>
		<pubDate>Tue, 03 May 2011 23:14:01 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[NetworkManager]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=651</guid>
		<description><![CDATA[For years now, I&#8217;ve had to run vpnc after connecting my school&#8217;s wireless. Truly, it never bothered me; however, at my new job, I need to run route after I connect to their wireless. For whatever reason, that got to me. I didn&#8217;t really want to run route when I wasn&#8217;t on their network (it [...]]]></description>
			<content:encoded><![CDATA[<p>For years now, I&#8217;ve had to run vpnc after connecting my school&#8217;s wireless.  Truly, it never bothered me; however, at my new job, I need to run route after I connect to their wireless.  For whatever reason, that got to me.  I didn&#8217;t really want to run route when I wasn&#8217;t on their network (it likely wouldn&#8217;t have screwed anything up, but still&#8230;).  So, I went about putting a quick bit in /etc/sysconfig/network-scripts/ifup-wireless, and it didn&#8217;t work&#8230; =\  So, after some digging, I&#8217;ve found another way using NetworkManager.  Here&#8217;s what I did:</p>
<p>Because I hate hacking up scripts that services use, I wrote a quick script and put it in <strong>/usr/local/bin/wireless.sh</strong>:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> iwconfig<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-c</span> MY-WORK-ESSID<br />
<span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; route add <span style="color: #660033;">-net</span> 111.111.111.111<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">22</span> gw 222.222.222.222<br />
<span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> iwconfig<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-c</span> msum-wireless<br />
<span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; vpnc<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></div>
<p>Once that was done, I ran:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>wireless.sh</div></div>
<p>and added the line:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>wireless.sh</div></div>
<p>to the file <strong>/etc/NetworkManager/dispatcher.d/00-netreport</strong> right before the exit.</p>
<p>And that&#8217;s it!  It would be neat if NetworkManager added in similar functionality through the GUI, but until that day, this should work fine.  Also, to note, those scripts are run as root, so be careful!</p>
<p>Update!</p>
<p>Upon upgrading from Fedora 14 to 15, the file 00-netreport was overwritten.  I&#8217;ve done updates to NetworkManager, so that had nothing to do with it.  In any case, if you end up upgrading your distro, there&#8217;s a chance that&#8217;ll get overwritten.  In the event it does, you&#8217;ll just have to paste the line to the script again.  (Another good reason to use a script!)</p>
<p>There may be a better way than what I&#8217;m doing above, but it works for me, so I&#8217;m not going to bother looking for another way.  Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2011/05/03/using-networkmanager-to-run-scripts-after-connecting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Ruby to run commands on a lab of Linux machines</title>
		<link>http://drewdahl.com/2011/02/24/using-ruby-to-run-commands-on-a-lab-of-linux-machines/</link>
		<comments>http://drewdahl.com/2011/02/24/using-ruby-to-run-commands-on-a-lab-of-linux-machines/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 03:19:20 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[highline]]></category>
		<category><![CDATA[net-ssh]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Yum]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=645</guid>
		<description><![CDATA[Lately, I&#8217;ve been getting acquainted with Rails development at work. It&#8217;s been a pretty steep learning curve (for that matter, I guess it still is), but I&#8217;ve enjoyed it thus far. So, with my new found Ruby skills (or, I guess more-so my new found need to learn Ruby), I wrote a script that uses [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, I&#8217;ve been getting acquainted with Rails development at work.  It&#8217;s been a pretty steep learning curve (for that matter, I guess it still is), but I&#8217;ve enjoyed it thus far.  So, with my new found Ruby skills (or, I guess more-so my new found need to learn Ruby), I wrote a script that uses SSH to iteratively connect to every computer in a lab and update them.  This could be used for just about anything, but for my instance it was updating a lab.  There was a bit more to my script as I needed to recompile some device drivers when there was a new kernel, but for simplicities sake, I&#8217;ve ripped them out. Hope this helps someone else!</p>
<p>First, you&#8217;ll need to install the ruby-ssh library.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> net-ssh<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> highline</div></div>
<p>And, the script is:</p>
<div class="codecolorer-container ruby twitlight" style="border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span><br />
<br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span><br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'net/ssh'</span><br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'highline/import'</span><br />
<br />
hosts=<span style="color:#006600; font-weight:bold;">&#91;</span> <span style="color:#996600;">&quot;host1&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#996600;">&quot;host2&quot;</span> <span style="color:#006600; font-weight:bold;">&#93;</span><br />
<br />
cmds = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;yum -y update&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#996600;">&quot;init 6&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><br />
<br />
username = <span style="color:#996600;">&quot;root&quot;</span><br />
<br />
<span style="color:#008000; font-style:italic;"># Assuming that all hosts have the same password</span><br />
password = ask<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;Enter Password: &quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>q<span style="color:#006600; font-weight:bold;">|</span> q.<span style="color:#9900CC;">echo</span> = <span style="color:#0000FF; font-weight:bold;">false</span> <span style="color:#006600; font-weight:bold;">&#125;</span><br />
<br />
hosts.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>host<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; <span style="color:#6666ff; font-weight:bold;">Net::SSH</span>.<span style="color:#9900CC;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span> host , username, <span style="color:#ff3333; font-weight:bold;">:password</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> password<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>ssh<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Connected to #{host}&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; cmds.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>cmd<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Performing #{cmd} on #{host}&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output = ssh.<span style="color:#CC0066; font-weight:bold;">exec</span>! cmd <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>ch, stream, data<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">if</span> stream == <span style="color:#ff3333; font-weight:bold;">:stderr</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Error: #{data}&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span> data<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>And, that&#8217;s all there is to it!  There&#8217;s a real lack of comments, but I feel it&#8217;s pretty self-explanatory.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2011/02/24/using-ruby-to-run-commands-on-a-lab-of-linux-machines/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple Shell in C</title>
		<link>http://drewdahl.com/2010/12/02/simple-shell-in-c/</link>
		<comments>http://drewdahl.com/2010/12/02/simple-shell-in-c/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 10:15:31 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=619</guid>
		<description><![CDATA[Well, life has been a 24/7 hell for the last few months. As an example of how much free time I&#8217;ve had, I haven&#8217;t seen a couple of my really good friends since July or August. Hopefully they haven&#8217;t forgotten about me In any case, I wrote a pretty good simple shell in C for [...]]]></description>
			<content:encoded><![CDATA[<p>Well, life has been a 24/7 hell for the last few months. As an example of how much free time I&#8217;ve had, I haven&#8217;t seen a couple of my really good friends since July or August. Hopefully they haven&#8217;t forgotten about me <img src='http://drewdahl.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In any case, I wrote a pretty good simple shell in C for my Operating Systems class. I finished it back in October, but haven&#8217;t posted it until now as several students just recently finished theirs.  Wouldn&#8217;t want them to cheat. <img src='http://drewdahl.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Less rambling.  The reason I&#8217;m posting this is that I think it is a really good example of using some basic system calls, such as malloc(), printf(), fgets(), strtok(), strcmp(), strcpy(), sprintf(), free(), chdir(), fork(), execpe(), opendir(), and wait(). Hopefully someone finds this useful <img src='http://drewdahl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="codecolorer-container cpp twitlight" style="border:1px solid #9F9F9F;width:435px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339900;">#include &lt;stdio .h&gt;</span><br />
<span style="color: #339900;">#include &lt;stdlib .h&gt;</span><br />
<span style="color: #339900;">#include &lt;unistd .h&gt;</span><br />
<span style="color: #339900;">#include &lt;string .h&gt;</span><br />
<span style="color: #339900;">#include &lt;sys /types.h&gt;</span><br />
<span style="color: #339900;">#include &lt;dirent .h&gt;</span><br />
<br />
<span style="color: #0000ff;">const</span> <span style="color: #0000ff;">int</span> SIZE<span style="color: #000080;">=</span><span style="color: #0000dd;">100</span><span style="color: #008080;">;</span><br />
<span style="color: #0000ff;">const</span> <span style="color: #0000ff;">int</span> ARGSIZE<span style="color: #000080;">=</span><span style="color: #0000dd;">10</span><span style="color: #008080;">;</span><br />
<br />
<span style="color: #0000ff;">void</span> cd<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>dir<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> ret <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">//Check to see if directory argument is blank</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>dir <span style="color: #000080;">==</span> <span style="color: #FF0000;">'<span style="color: #006699; font-weight: bold;">\0</span>'</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dir <span style="color: #000080;">=</span> <span style="color: #0000dd;">getenv</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;HOME&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #666666;">//Check to see if directory argument starts with ~ and replace it with $HOME</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>dir<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">==</span> <span style="color: #FF0000;">'~'</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">char</span><span style="color: #000040;">*</span> temp <span style="color: #000080;">=</span> <span style="color: #0000dd;">malloc</span><span style="color: #008000;">&#40;</span>SIZE<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">strcpy</span><span style="color: #008000;">&#40;</span>temp,dir<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">sprintf</span><span style="color: #008000;">&#40;</span>dir,<span style="color: #FF0000;">&quot;%s%s&quot;</span>,<span style="color: #0000dd;">getenv</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;HOME&quot;</span><span style="color: #008000;">&#41;</span>,temp<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">free</span><span style="color: #008000;">&#40;</span>temp<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">//Change Directory</span><br />
&nbsp; &nbsp; ret <span style="color: #000080;">=</span> chdir<span style="color: #008000;">&#40;</span>dir<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ret <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">fprintf</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">stderr</span>,<span style="color: #FF0000;">&quot;Failed to enter directory: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>,dir<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>,dir<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">void</span> ls<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>dir<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; DIR<span style="color: #000040;">*</span> open_dir<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">struct</span> dirent<span style="color: #000040;">*</span> drent<span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>dir <span style="color: #000080;">==</span> <span style="color: #FF0000;">'<span style="color: #006699; font-weight: bold;">\0</span>'</span><span style="color: #008000;">&#41;</span> <span style="color: #666666;">//See if dir is valid, if not set it to current directory</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dir <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">char</span><span style="color: #000040;">*</span><span style="color: #008000;">&#41;</span><span style="color: #FF0000;">&quot;.&quot;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>open_dir <span style="color: #000080;">=</span> opendir<span style="color: #008000;">&#40;</span>dir<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span> <span style="color: #666666;">//open dir</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>drent <span style="color: #000080;">=</span> readdir<span style="color: #008000;">&#40;</span>open_dir<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span> <span style="color: #666666;">//get contents of directory</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;%s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>,drent<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>d_name<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//print contents</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; closedir<span style="color: #008000;">&#40;</span>open_dir<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//close dir</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">void</span> execute<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>args<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> status<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; pid_t pid<span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666;">//fork and execute the command&nbsp; &nbsp; </span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>pid <span style="color: #000080;">=</span> fork<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; execvp<span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span>,args<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">//execvp should only return if there was an error</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">fprintf</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">stderr</span>,<span style="color: #FF0000;">&quot;Unknown command<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">exit</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>pid <span style="color: #000080;">&lt;</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">fprintf</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">stderr</span>,<span style="color: #FF0000;">&quot;Failed to fork(): %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; status <span style="color: #000080;">=</span> <span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #666666;">//Wait for child so stdin and stdout aren't fighting for use&nbsp; &nbsp; </span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span>wait<span style="color: #008000;">&#40;</span><span style="color: #000040;">&amp;</span>status<span style="color: #008000;">&#41;</span> <span style="color: #000040;">!</span><span style="color: #000080;">=</span> pid<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">continue</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>argv<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>, <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>envp<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>temp<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>line<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>args<span style="color: #008000;">&#91;</span>ARGSIZE<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">char</span> argIndex <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #008080;">;;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; line <span style="color: #000080;">=</span> <span style="color: #0000dd;">malloc</span><span style="color: #008000;">&#40;</span>SIZE<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//Allocate memory for line</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; argIndex <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> <span style="color: #666666;">//Initialize argIndex</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>[SHELL ] &quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">fgets</span><span style="color: #008000;">&#40;</span>line, SIZE, <span style="color: #0000ff;">stdin</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//Get Input</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; temp <span style="color: #000080;">=</span> <span style="color: #0000dd;">strtok</span><span style="color: #008000;">&#40;</span>line, <span style="color: #FF0000;">&quot; <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//Get input into an array to use w/ execve</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span>temp <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; args<span style="color: #008000;">&#91;</span>argIndex<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> temp<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; argIndex<span style="color: #000040;">++</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp <span style="color: #000080;">=</span> <span style="color: #0000dd;">strtok</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">NULL</span>, <span style="color: #FF0000;">&quot; <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; args<span style="color: #008000;">&#91;</span>argIndex<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">char</span><span style="color: #000040;">*</span><span style="color: #008000;">&#41;</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> <span style="color: #666666;">//Set the end of the arguments list</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span>, <span style="color: #FF0000;">&quot;quit&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #000040;">||</span> <span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span>, <span style="color: #FF0000;">&quot;exit&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span> <span style="color: #666666;">//break out for for(;;) loop</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>line<span style="color: #000080;">==</span> <span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;[SHELL ] &quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span>, <span style="color: #FF0000;">&quot;ls&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ls<span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//run ls</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span>, <span style="color: #FF0000;">&quot;cd&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cd<span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//run cd</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; execute<span style="color: #008000;">&#40;</span>args<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//Fork and Execute command</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">free</span><span style="color: #008000;">&#40;</span>line<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//Free memory from line</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000dd;">printf</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>And, in case you want a Makefile (I know I do!):</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">CC = <span style="color: #c20cb9; font-weight: bold;">gcc</span><br />
OBJECTS =<br />
PROC = shell<br />
<br />
CFLAGS =<br />
LFLAGS =<br />
<br />
$<span style="color: #7a0874; font-weight: bold;">&#40;</span>PROC<span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
$<span style="color: #7a0874; font-weight: bold;">&#40;</span>CC<span style="color: #7a0874; font-weight: bold;">&#41;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>CFLAGS<span style="color: #7a0874; font-weight: bold;">&#41;</span> simpleshell.c <span style="color: #660033;">-o</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>PROC<span style="color: #7a0874; font-weight: bold;">&#41;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>LFLAGS<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
all:<br />
$<span style="color: #7a0874; font-weight: bold;">&#40;</span>CC<span style="color: #7a0874; font-weight: bold;">&#41;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>CFLAGS<span style="color: #7a0874; font-weight: bold;">&#41;</span> simpleshell.c <span style="color: #660033;">-o</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>PROC<span style="color: #7a0874; font-weight: bold;">&#41;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>LFLAGS<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
clean:<br />
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">*</span>.o <span style="color: #000000; font-weight: bold;">*</span>.c~ $<span style="color: #7a0874; font-weight: bold;">&#40;</span>PROC<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Enjoy!</p>
<p>(P.S&#8230; Todoist-for-Android updates will follow! I promise! The holidays are coming after all! :-] )<br />
</dirent></dirent></sys></string></unistd></stdlib></stdio></p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2010/12/02/simple-shell-in-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TODOIST For Android — Some development updates and screenshots</title>
		<link>http://drewdahl.com/2010/07/11/todoist-for-android-some-development-updates-and-screenshots/</link>
		<comments>http://drewdahl.com/2010/07/11/todoist-for-android-some-development-updates-and-screenshots/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 13:11:37 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Todoist for Android]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=581</guid>
		<description><![CDATA[Well, the first beta release is looking like it&#8217;ll be today or tomorrow. It will incorporate only a 7-day view (with overdue tasks as well) and at current, you won&#8217;t be able to &#8220;complete&#8221; tasks with it, but if you&#8217;re lucky, I&#8217;ll be able to squeeze that in before I release it There are just [...]]]></description>
			<content:encoded><![CDATA[<p>Well, the first beta release is looking like it&#8217;ll be today or tomorrow. It will incorporate only a 7-day view (with overdue tasks as well) and at current, you won&#8217;t be able to &#8220;complete&#8221; tasks with it, but if you&#8217;re lucky, I&#8217;ll be able to squeeze that in before I release it <img src='http://drewdahl.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>There are just a few bugs here and there to fix, but I don&#8217;t foresee any major issues.  As always, here is a current screen shot of the app in action:<br />
<div id="attachment_582" class="wp-caption alignleft" style="width: 251px"><a href="http://drewdahl.com/2010/07/11/todoist-for-android-some-development-updates-and-screenshots/todoist-app/" rel="attachment wp-att-582"><img src="http://drewdahl.com/wp-content/uploads/2010/07/Todoist-App.png" alt="" title="Todoist-App" width="241" height="428"  class="size-full wp-image-582"/></a><p class="wp-caption-text">TODOIST for Android Screenshot</p></div></p>
<p>If you have any suggestions on the current interface, please be sure to let me know!  I&#8217;m thinking a little vertical spacing is needed and the project listings on the right should have a bit of padding, but that&#8217;s all I can say for sure.</p>
<p>Anyway, on to development updates!  We&#8217;ve switched repositories from a locally hosted Mercurial repo to a github hosted Git repository.  You can see the repository <a href="http://github.com/DrewDahl/Todoist-for-Android">here</a>.</p>
<p>And the final update!  We&#8217;ve moved from our trac installation to using bugzilla to handle all of our issue tracking.  That said, once the application is out, if you notice any issues with it, feel free to submit a bug report through the interface, or create an account on our bugzilla installation and report it!  You can find out bugzilla installation <a href="http://bugzilla.drewdahl.com/">here</a>.</p>
<p>That&#8217;s all for today!  If you don&#8217;t see our first beta release tonight, expect one on Monday (Tuesday at the latest!)</p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2010/07/11/todoist-for-android-some-development-updates-and-screenshots/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>TODOIST For Android Update</title>
		<link>http://drewdahl.com/2010/07/07/todoist-for-android-update-2/</link>
		<comments>http://drewdahl.com/2010/07/07/todoist-for-android-update-2/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 05:08:36 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Todoist for Android]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=557</guid>
		<description><![CDATA[Well, it&#8217;s been a little while, but I&#8217;ve been making some slow progress towards my goal. Right now, I have log-ins working (it also stores your API key if you want it to be stored, thus never needing to login again). There&#8217;s a &#8220;Report&#8221; feature in the event you find bugs. And, as of right [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s been a little while, but I&#8217;ve been making some slow progress towards my goal.  Right now, I have log-ins working (it also stores your API key if you want it to be stored, thus never needing to login again).  There&#8217;s a &#8220;Report&#8221; feature in the event you find bugs.  And, as of right now, I have a fairly dirty interface that it opens up to (shows you a 7 day listing and overdue tasks).  In the images below, I hacked the times together, so it&#8217;s actually showing you a week in the past, but it&#8217;s all good.  I also don&#8217;t have the overdue tasks feature built-in quite yet, but that shouldn&#8217;t take more than an hour to write.</p>
<p>My goal?  A beta release by this weekend.</p>
<p>Here are some screen shots.  They&#8217;re kind of poor, but it happens.  Also, the number on the app is the number of the project it&#8217;s related to (I need get a lookup working):<br />
<a href="http://drewdahl.com/2010/07/07/todoist-for-android-update-2/todoist_app/" rel="attachment wp-att-560"><img src="http://drewdahl.com/wp-content/uploads/2010/07/todoist_app-300x290.png" alt="" title="My Todoist App" width="205" height="210" class="alignleft size-medium wp-image-560" /></a><a href="http://drewdahl.com/2010/07/07/todoist-for-android-update-2/todoist_actual/" rel="attachment wp-att-559"><img src="http://drewdahl.com/wp-content/uploads/2010/07/todoist_actual.png" alt="" title="My Actual Todoist" width="310" height="210" class="alignright size-full wp-image-559" /></a></p>
<p>So, where do I go from here?  Well, I&#8217;m going to try to spiff up the interface a tiny bit, so it&#8217;s not so crappy looking (More TODOIST like).  Then after the Beta release, I&#8217;m going to move on to Project listing (viewing only) and probably do another beta release once that&#8217;s complete.  After that, I&#8217;ll add the ability to add tasks to projects and release another beta.  And after that, fix a few bugs, add local storage of data (until then, it will look-up data from the Internet for each request and will be slower), and release it on the Market.  Once it&#8217;s up on the Market, I&#8217;ll keep adding features to it (and if you think of any features you&#8217;d love to see, let me know and I&#8217;ll make note!)</p>
<p>Let me know what you think and I&#8217;ll post again with the beta this weekend *fingers crossed*</p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2010/07/07/todoist-for-android-update-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Todoist for Android Update &#8212; Feedback Appreciated!</title>
		<link>http://drewdahl.com/2010/06/16/todoist-for-android-update-feedback-appreciated/</link>
		<comments>http://drewdahl.com/2010/06/16/todoist-for-android-update-feedback-appreciated/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 02:15:14 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Todoist for Android]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=555</guid>
		<description><![CDATA[Well, this has been a fairly slow process due to work and a laundry list of other things. But, in any case&#8230; I&#8217;m writing this for multiple reasons. The first is to let everyone know that someone has beaten me to releasing a Todoist application for the Android. Now, while I was slightly disheartened to [...]]]></description>
			<content:encoded><![CDATA[<p>Well, this has been a fairly slow process due to work and a laundry list of other things.  But, in any case&#8230; I&#8217;m writing this for multiple reasons.  The first is to let everyone know that someone has beaten me to releasing a Todoist application for the Android.  Now, while I was slightly disheartened to find this out, I&#8217;m also glad to hear this since mine was taking so long.  The name of this app is TodoistDroid and you can find their app on the Market.  You can also find their site <a href="http://www.numaridge.com/">here</a>.</p>
<p>Now, while I urge you all to go and check it out, I also hope that you all return to check out my app once it is completed.  Better yet, I&#8217;d love it to hear your feedback once beta testing starts.  I also hope that you all share the same feelings as I when I say that I&#8217;m not a fan for paying for apps.  The TodoistDroid app has a &#8220;Lite&#8221; version and a &#8220;Regular&#8221; version.  The latter of course costs money.</p>
<p>Now, while paying the money is surely justified, I don&#8217;t believe in it.  This is why I will be releasing my application with only one version, which will be free. Their list of features and planned features are mostly composed of ideas that I&#8217;ve already had for my app (as well as a few they haven&#8217;t listed yet <img src='http://drewdahl.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).  And lastly, I can&#8217;t say I liked their interface all that much.  Now, while mine probably wont&#8217; be 100% different (for the most part at least), I was planning to design everything around querying (main screen giving you your weekly list and that sort of thing).</p>
<p>That is why, I would love for you all to comment on how YOU use TODOIST.  I would rather not design this for how I use it, as that may not be how everyone uses it.  So please, in the comments section below, tell me about how you use it!</p>
<p>Now, on to the app.  I&#8217;m running short on time at current, so I don&#8217;t have any screenshots for you today (Sorry! <img src='http://drewdahl.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  ).  The login is working great, I have a support page where you can easily file bugs working, and the main section is able to display tasks.  My first beta release will come before the end of the month and will show you a query of overdue items as well as items due in the next seven (7) days.</p>
<p>That is all for today, and please, tell me how you use TODOIST so I can design it around what you want to see <img src='http://drewdahl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2010/06/16/todoist-for-android-update-feedback-appreciated/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HowTo Setup Authenticated Postfix</title>
		<link>http://drewdahl.com/2010/05/15/howto-setup-authenticated-postfix/</link>
		<comments>http://drewdahl.com/2010/05/15/howto-setup-authenticated-postfix/#comments</comments>
		<pubDate>Sun, 16 May 2010 00:54:01 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Fedora 12]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=478</guid>
		<description><![CDATA[I recently had the experience of setting up Postfix. It works really well, in my opinion; however, setting it up wasn&#8217;t the simplest for what I wanted. But, at least it was simpler than sendmail Reading through several articles on the Internet, everyone was giving steps on how to setup postfix to handle e-mail for [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the experience of setting up Postfix.  It works really well, in my opinion; however, setting it up wasn&#8217;t the simplest for what I wanted.  But, at least it was simpler than sendmail <img src='http://drewdahl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Reading through several articles on the Internet, everyone was giving steps on how to setup postfix to handle e-mail for any FQDN (Fully-Qualified Domain Name).  Well, we don&#8217;t want to be handling someone else&#8217;s e-mail, so we decided to set it up with authentication.  All of the guides on setting up Postfix with SASL authentication are great and all; however, they don&#8217;t address the issue of, what if you want to receive mail as well.  That&#8217;s a simple fix, but moreover, what if you have a service like mailman running?  Mailman isn&#8217;t easily configured to authenticate against the SMTP server to send mail.  So, the following are the configurations that I&#8217;ve come up with to solve all of these problems:</p>
<p>For the file /etc/postfix/main.cf</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:700px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;queue_directory = /var/spool/postfix<br />
command_directory = /usr/sbin<br />
daemon_directory = /usr/libexec/postfix<br />
data_directory = /var/lib/postfix<br />
mail_owner = postfix<br />
myhostname = hostname.domain.tld<br />
mydomain = domain.tld<br />
myorigin = $mydomain<br />
inet_interfaces = all<br />
inet_protocols = all<br />
mydestination = $myhostname, localhost.$mydomain, localhost, localhost.localdomain, $mydomain<br />
unknown_local_recipient_reject_code = 550<br />
mynetworks = 192.168.0.0/24, 127.0.0.1/32<br />
relay_domains = $mydestination<br />
smtpd_sasl_auth_enable = yes<br />
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination<br />
broken_sasl_auth_clients = yes<br />
alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases<br />
alias_database = hash:/etc/aliases<br />
recipient_delimiter = +<br />
debug_peer_level = 2<br />
debugger_command =<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ddd $daemon_directory/$process_name $process_id &amp; sleep 5<br />
sendmail_path = /usr/sbin/sendmail.postfix<br />
newaliases_path = /usr/bin/newaliases.postfix<br />
mailq_path = /usr/bin/mailq.postfix<br />
setgid_group = postdrop<br />
html_directory = no<br />
manpage_directory = /usr/share/man<br />
sample_directory = /usr/share/doc/postfix-2.6.5/samples<br />
readme_directory = /usr/share/doc/postfix-2.6.5/README_FILES&lt;/strong&gt;</div></div>
<p>Now keep in mind, your values for some of the above WILL be different.  This configuration is on a machine that&#8217;s running mailman as well (thus the /etc/mailman/aliases file).  </p>
<p>And lastly, for SASL auth, edit the file: /usr/lib64/sasl2/smtpd.conf</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;pwcheck_method: saslauthd<br />
mech_list: plain login&lt;/strong&gt;</div></div>
<p>Your lib64 directory may just be lib, depending on the architecture of your box.  All of these edits were made a 64-bit Fedora 12 machine, but they should work for every machine.  </p>
<p>And last note.  After all of the edits have been made, make sure to restart postfix and restart saslauthd with the following:</p>
<p><strong>/etc/init.d/postfix restart<br />
/etc/init.d/saslauthd restart</strong></p>
<p>For questions on what some of the postfix settings mean, you can check out one of the following:</p>
<p>postconf man-page by running &#8220;<strong>man postconf</strong>&#8221; or visit <a href="http://www.postfix.org/postconf.5.html">http://www.postfix.org/postconf.5.html</a></p>
<p>Postfix Documentation at: <a href="http://www.postfix.org/documentation.html">http://www.postfix.org/documentation.html</a></p>
<p>Postfix HowTo&#8217;s at:<a href="http://www.postfix.org/docs.html"> http://www.postfix.org/docs.html</a></p>
<p>Postfix is definition the easiest MTA I&#8217;ve ever had the pleasure of working with, as far as configuration goes.  I hope this helps <img src='http://drewdahl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2010/05/15/howto-setup-authenticated-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forefront Client Security &#8211; MOM Installation Failure</title>
		<link>http://drewdahl.com/2010/05/02/forefront-client-security-mom-installation-failure/</link>
		<comments>http://drewdahl.com/2010/05/02/forefront-client-security-mom-installation-failure/#comments</comments>
		<pubDate>Sun, 02 May 2010 05:38:19 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Forefront]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=476</guid>
		<description><![CDATA[Well, I&#8217;m working on installing Forefront Client Security at my work and after configuring all of the prerequisites, nobody could figure out why it wasn&#8217;t installing. So, I setup a test machine and started playing with it. After about an hour of searching google, it seems nobody really has an answer for why MOM fails [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I&#8217;m working on installing Forefront Client Security at my work and after configuring all of the prerequisites, nobody could figure out why it wasn&#8217;t installing.  So, I setup a test machine and started playing with it.  After about an hour of searching google, it seems nobody really has an answer for why MOM fails to install&#8230; but, I just figured it out!</p>
<p>If you check the installation logs in C:\Program Files\Microsoft Forefront\Client Security\Logs\MOMDB.log, you should notice there&#8217;s a line in there about an error running a query that results in an ERROR 112.  The error is something like &#8220;There is not enough space on disk.&#8221;  Well, in my case I had 60GB free on the disk, so this can&#8217;t be right&#8230;  The database to be created was only 1GB in size.</p>
<p>Well, turns out the Quota on the disk was preventing the file from being created.  To change the Quota (or in my case, turn it off for the duration of the install) go to Computer -&gt; Right click on the drive you&#8217;re installing on -&gt; Select &#8220;Properties&#8221; -&gt; Click on the &#8220;Quota&#8221; tab.  Once here you can either uncheck &#8220;Enable Quota Management&#8221; to completely disable it, or just select the radio button that reads &#8220;Do not limit disk usage&#8221;.</p>
<p>This should hopefully solve the problem <img src='http://drewdahl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2010/05/02/forefront-client-security-mom-installation-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ISP Change</title>
		<link>http://drewdahl.com/2010/04/24/isp-change/</link>
		<comments>http://drewdahl.com/2010/04/24/isp-change/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 19:22:07 +0000</pubDate>
		<dc:creator>Drew Dahl</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://drewdahl.com/?p=468</guid>
		<description><![CDATA[Well, come this Thursday, we will be going offline due to an ISP Change. Recently Midcontinent Communications start serving our area, and I must say I&#8217;ve been waiting for this for the last three years (Fargo&#8217;s out of luck though. Poor guys.) Anyway, I&#8217;m switching from Cable One who&#8217;s been throttling the connection Comparison: Cable [...]]]></description>
			<content:encoded><![CDATA[<p>Well, come this Thursday, we will be going offline due to an ISP Change.  Recently <a href="http://www.midcocomm.com/">Midcontinent Communications</a> start serving our area, and I must say I&#8217;ve been waiting for this for the last three years <img src='http://drewdahl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   (Fargo&#8217;s out of luck though.  Poor guys.)  Anyway, I&#8217;m switching from Cable One who&#8217;s been throttling the connection</p>
<p>Comparison:</p>
<p style="padding-left: 30px;">Cable One vs. Midcontinent</p>
<p>Contracts?</p>
<p style="padding-left: 30px;">Yes vs No</p>
<p>Throttling?</p>
<p style="padding-left: 30px;">Yes vs No</p>
<p>Price?</p>
<p style="padding-left: 30px;">$56.99 vs $56.99</p>
<p>Down Speed?</p>
<p style="padding-left: 30px;">5Mb vs 25Mb</p>
<p>Up Speed?</p>
<p style="padding-left: 30px;">0.5Mb vs 2Mb</p>
<p>Personally, I hope they give Cable One a run for their money.  Their television and phone is way better for the price, but we won&#8217;t get into that here ^_-</p>
<p>Anyway, what does this mean for us?  Well, they&#8217;re running new cables starting at 5pm CST, and as long as everything goes well, we&#8217;re looking at a 2-3hr downtime, so we should be back up and on-line by 8pm CST with a much faster speed <img src='http://drewdahl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  Should really notice it on your ends!  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://drewdahl.com/2010/04/24/isp-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: drewdahl.com @ 2012-05-21 03:10:50 by W3 Total Cache -->
