<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Article RSS Feed</title>
    <link>http://your-web-site.com/rss/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The main blog feed for my Web site.</description>
    
    
        <item>
          <title>Bundle Config & Bundle Open</title>
          <description>&lt;p&gt;I wanted to be able to open up gems easily from the command line.  I tried `bundle open unicorn` and got the following error:&lt;/p&gt;

&lt;p&gt;To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR&lt;/p&gt;

&lt;p&gt;To get rid of this error I used `export BUNDLER_EDITOR=mate`.  This causes TextMate to open the gem of choice when I call `bundle open unicorn`&lt;/p&gt;
</description>
          <pubDate>Fri, 25 Feb 2011 12:32:54 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2011/02/25/bundle-config-bundle-open/</guid>
          <link>http://your-web-site.com/articles/2011/02/25/bundle-config-bundle-open/</link>
        </item>
    
        <item>
          <title>Escaping and Unescaping in HAML</title>
          <description>To turn escaped HTML into HAML, use &lt;i&gt;!=&lt;/i&gt; instead of just &lt;i&gt;=&lt;/i&gt;&lt;br&gt;
To escape unescaped HTML, use &lt;i&gt;&amp;=&lt;/i&gt; instead of just &lt;i&gt;=&lt;/i&gt;.&lt;br&gt;&lt;br&gt;
&lt;pre&gt;
&gt; Haml::Engine.new('!= &quot;&lt;p&gt; Hello World&lt;/p&gt;&quot;').render&lt;br&gt;
=&gt; &quot;&lt;p&gt; Hello World&lt;/p&gt;\n&quot; &lt;br&gt;
&gt; Haml::Engine.new('%p Hello World').render&lt;br&gt;
=&gt; &quot;&lt;p&gt;Hello World&lt;/p&gt;\n&quot; &lt;br&gt;
&gt; Haml::Engine.new('= &quot;&lt;p&gt; Hello World&lt;/p&gt;&quot;').render&lt;br&gt;
=&gt; &quot;&lt;p&gt; Hello World&lt;/p&gt;\n&quot; &lt;br&gt;
&lt;/pre&gt;
&lt;br&gt;&lt;br&gt;
Resources&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#unescaping_html&quot;&gt;Unescaping HTML&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#escaping_html&quot;&gt;Escaping HTML&lt;/a&gt;

</description>
          <pubDate>Fri, 04 Feb 2011 09:36:29 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2011/02/04/escaping-and-unescaping-in-haml/</guid>
          <link>http://your-web-site.com/articles/2011/02/04/escaping-and-unescaping-in-haml/</link>
        </item>
    
        <item>
          <title>redirect_to vs render</title>
          <description>&lt;ul&gt;
&lt;li&gt;redirect_to causes the browser to receive a 302.&lt;/li&gt;
&lt;li&gt;The browser makes a brand new request and you will need to supply the browser with the information it needs to make the request such as the object attributes.&lt;/li&gt;
&lt;li&gt;Any existing variables will be lost.&lt;/li&gt;
&lt;li&gt;redirect_to is the right choice when you are posting a completely filled out form with valid data.&lt;/li&gt;
&lt;/ul&gt;

&lt;ul&gt;
&lt;li&gt;render causes the browser to return a 200.&lt;/li&gt;
&lt;li&gt;The browser does not make a new request and instead just renders the page you specify without sending any information to it.&lt;/li&gt;
&lt;li&gt;The code in the rendered action will not be executed, it simply returns the view&lt;/li&gt;
&lt;li&gt;render is the right choice when a form was incorrectly filled out and you want to display errors on the page you were just on as well as saving state of all the data that had already been entered into the form.&lt;/li&gt; 
&lt;/ul&gt;
&lt;br /&gt;
A link that helped me:&lt;br /&gt;
http://www.helloworlder.com/?p=6</description>
          <pubDate>Wed, 02 Feb 2011 09:31:51 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2011/02/02/redirect_to-vs-render/</guid>
          <link>http://your-web-site.com/articles/2011/02/02/redirect_to-vs-render/</link>
        </item>
    
        <item>
          <title>Remove Files Older Than a Particular Date From a Directory in Unix</title>
          <description>I have a folder filled with hundreds of images.  Most of the images were first added to the folder on May 19th.  The folder I'm moving them to already has all the images that were added on May 19th, so to save time, I don't want to move the May 19th images. I made a back up of my images folder that and am using the below commands within it. I only want to keep images added after May 19th in the folder so that I can zip them up and move them to another server.  I'm using a dummy folder I made locally to test this out.  Here are the unix commands I will use:

&lt;br /&gt;&lt;br /&gt;

&lt;br /&gt;[Liah-Hansens-MacBook-Pro:~/test]$ ls -al
&lt;br /&gt;total 0
&lt;br /&gt;drwxr-xr-x   6 liahhansen  staff   204 Dec 15 15:01 ./
&lt;br /&gt;drwxr-xr-x+ 75 liahhansen  staff  2550 Dec 14 19:18 ../
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 Dec 15 13:58 goodbye
&lt;br /&gt;drwxr-xr-x   2 liahhansen  staff    68 Dec 14 19:30 happy/
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 Dec 15 13:58 hello
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 May 24  2010 timefilealittleolder
&lt;br /&gt;&lt;br /&gt;[Liah-Hansens-MacBook-Pro:~/test]$ touch -am 05192010 timefile

&lt;br /&gt;&lt;br /&gt;[Liah-Hansens-MacBook-Pro:~/xargs_test]$ ls -al
&lt;br /&gt;total 0
&lt;br /&gt;drwxr-xr-x   7 liahhansen  staff   238 Dec 15 15:11 ./
&lt;br /&gt;drwxr-xr-x+ 75 liahhansen  staff  2550 Dec 14 19:18 ../
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 Dec 15 13:58 goodbye
&lt;br /&gt;drwxr-xr-x   2 liahhansen  staff    68 Dec 14 19:30 happy/
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 Dec 15 13:58 hello
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 May 19  2010 timefile
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 May 24  2010 timefilealittleolder

&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The important part:&lt;/b&gt;

&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Liah-Hansens-MacBook-Pro:~/test]$ find . -mtime +208 -type f | xargs rm&lt;/b&gt;

&lt;br /&gt;&lt;br /&gt;[Liah-Hansens-MacBook-Pro:~/xargs_test]$ ls -al
&lt;br /&gt;total 0
&lt;br /&gt;drwxr-xr-x   6 liahhansen  staff   204 Dec 15 15:11 ./
&lt;br /&gt;drwxr-xr-x+ 75 liahhansen  staff  2550 Dec 14 19:18 ../
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 Dec 15 13:58 goodbye
&lt;br /&gt;drwxr-xr-x   2 liahhansen  staff    68 Dec 14 19:30 happy/
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 Dec 15 13:58 hello
&lt;br /&gt;-rw-r--r--   1 liahhansen  staff     0 May 24  2010 timefilealittleolder

&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Now timefile is gone.  Yay!&lt;/b&gt;

&lt;br /&gt;&lt;br /&gt;When I performed these commands on the real files, I ran into a problem where many of the file names had whitespace in them.  This caused rm to fail and I still had many files left in the folder from May 19th.  Here is the command that got rid of them once and for all:
&lt;br /&gt;&lt;br /&gt;  
find . -mtime +208 -type f | xargs -I{} rm '{}'
&lt;br /&gt;&lt;br /&gt;
Checking just to make sure:
&lt;br /&gt; 
ls -al |grep &quot;May 19&quot; | wc -l
&lt;br /&gt;
0
&lt;br /&gt;&lt;br /&gt; 
Golden!
&lt;br /&gt;&lt;br /&gt; </description>
          <pubDate>Wed, 15 Dec 2010 13:12:45 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2010/12/15/remove-files-older-than-a-particular-date-from-a-directory-in-unix/</guid>
          <link>http://your-web-site.com/articles/2010/12/15/remove-files-older-than-a-particular-date-from-a-directory-in-unix/</link>
        </item>
    
        <item>
          <title>First Program in C</title>
          <description>&lt;p&gt;Now that I&amp;rsquo;ve got Ruby and Rails fairly well learned and practiced, I decided it was time to start working towards my long term goal of blending my programming skills with my love of art.  Here is my first baby step towards learning C:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;touch foo.c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mate foo.c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In foo.c I wrote (with the help of my roommate Sean):&lt;/p&gt;

&lt;p&gt;`#include &amp;lt;stdio.h&gt;
int main() {&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;int i;
printf(&quot;Hello World!!!!!!\n&quot;);
for(i=0; i&amp;lt;5; i++) {
    printf(&quot;%d\n&quot;, i);
}
return 0;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;Next, I compiled my program:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gcc foo.c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This created a file called a.out&lt;/p&gt;

&lt;p&gt;Next I ran a.out&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./a.out&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And it out put:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Hello World!!!!!!
0
1
2
3
4&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Sean also taught me how to define the name of the out file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gcc -o foo foo.c&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This let me do the following to execute my program:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;./foo&lt;/code&gt;&lt;/p&gt;
</description>
          <pubDate>Mon, 04 Oct 2010 10:41:56 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2010/10/04/first-program-in-c/</guid>
          <link>http://your-web-site.com/articles/2010/10/04/first-program-in-c/</link>
        </item>
    
        <item>
          <title>Open Government @ GoGaRuCo</title>
          <description>&lt;p&gt;Eric Mill gave an inspiring talk at Golden Gate Ruby Conference. Below are my notes about it.&lt;/p&gt;

&lt;p&gt;Innovative websites written in Rails and based off of open government data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;http://datasf.org/showcase/&lt;/li&gt;
&lt;li&gt;http://www.nyc.gov/html/datamine/html/home/home.shtml&lt;/li&gt;
&lt;li&gt;http://data.dc.gov/&lt;/li&gt;
&lt;li&gt;http://www.appsfordemocracy.org/&lt;/li&gt;
&lt;li&gt;http://www.data.gov/&lt;/li&gt;
&lt;li&gt;http://flyontime.us/&lt;/li&gt;
&lt;li&gt;http://usaspending.gov/&lt;/li&gt;
&lt;li&gt;http://sunlightfoundation.com/clearspending/&lt;/li&gt;
&lt;li&gt;http://www.thomas.gov/&lt;/li&gt;
&lt;li&gt;http://www.govtrack.us/ &amp;mdash; scrapes thomas&lt;/li&gt;
&lt;li&gt;http://www.opencongress.org/ &amp;mdash; built off of govtrack.us, rails app&lt;/li&gt;
&lt;li&gt;inspired congress to publish votes in xml&lt;/li&gt;
&lt;li&gt;senate also puts out info in xml&lt;/li&gt;
&lt;li&gt;no where near all 50 states give out info&lt;/li&gt;
&lt;li&gt;sunlight is trying to make state apis the norm&lt;/li&gt;
&lt;li&gt;mongo db is necessary for it &amp;ndash; like some states have only one house, not two&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Federal Register &amp;ndash; one of the more important publications of the government
&amp;ndash; rulemaking
&amp;ndash; public notices
&amp;ndash; chances to comment
&amp;ndash; published by the office of the public register&lt;/p&gt;

&lt;p&gt;http://www.govpulse.us/ was one result of a contest &amp;ndash; open source rails app on github, EC2
* it shows what is going on in your area
* government contacted them and contracted the develpers
* ditched some red tape
* pushedthem to take risks
* buy-in from the top of the agency
*  made something happen in 3 months&amp;hellip;much faster than most gov projects
* they cut their hours by 40% at regular jobs
* result of their work: http://www.federalregister.gov/&lt;/p&gt;

&lt;p&gt;Gov is seeing devs as their customers&lt;/p&gt;

&lt;p&gt;America
* first country to have a freedom of information act
* all govs info is in the public domain
* we have the freedom to set amazing examples &amp;ndash; what we do matters &amp;ndash; talk to other people&lt;/p&gt;

&lt;p&gt;2010 census &amp;ndash; machine readable, but have to get through 300 pages of pdf instructions &amp;ndash; people have written ruby libraries around the data.&lt;/p&gt;
</description>
          <pubDate>Wed, 22 Sep 2010 12:06:26 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2010/09/22/open-government-gogaruco/</guid>
          <link>http://your-web-site.com/articles/2010/09/22/open-government-gogaruco/</link>
        </item>
    
        <item>
          <title>Twilio & Rails: 502 Bad Gateway Error Solution</title>
          <description>&lt;p&gt;I ran into an issue while writing a Twilio app in Rails where Twilio kept getting a 502 bad gateway error.  The url I was using was definitely working, so that wasn&amp;rsquo;t the issue.  I did a little google sleuthing and the answer is putting the following code into the controller:&lt;/p&gt;

&lt;p&gt;  &lt;code&gt;skip_before_filter :verify_authenticity_token&lt;/code&gt;&lt;/p&gt;
</description>
          <pubDate>Sun, 25 Jul 2010 10:37:42 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2010/07/25/twilio-rails-502-bad-gateway-error-solution/</guid>
          <link>http://your-web-site.com/articles/2010/07/25/twilio-rails-502-bad-gateway-error-solution/</link>
        </item>
    
        <item>
          <title>Voicenotes: My First Twilio App</title>
          <description>&lt;p&gt;Sometimes I wonder about my sanity when I voluntarily spend a sunny Saturday in a basement writing code. Yesterday was one of those days at the Social App Workshop held at Heroku&amp;rsquo;s new headquarters.  The morning was an action packed string of talks from engineers at Twitter, Twilio, Facebook, Apigee and Heroku.  I was really impressed with Jeff&amp;rsquo;s talk about Twilio and thought I&amp;rsquo;d try making an app with it&amp;rsquo;s api.&lt;/p&gt;

&lt;p&gt;The results of my efforts are here: &lt;a href=&quot;http://voicenotes.heroku.com/voice_to_text&quot;&gt;http://voicenotes.heroku.com/voice_to_text&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My goal was to write an app that you could call, record a message, and the message would be transcribed and put on a webpage. The transcribe feature is pretty inaccurate.  I left a voicenote of &amp;lsquo;Remember to take out the trash&amp;rsquo; and it transcribed it as &amp;lsquo;Remember to take out the plan&amp;rsquo;.  It got &amp;lsquo;two laundry&amp;rsquo; when I said &amp;lsquo;do laundry&amp;rsquo;.  But still, Twilio is a very cool idea and it got my idea juices flowing.&lt;/p&gt;
</description>
          <pubDate>Sun, 25 Jul 2010 10:37:22 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2010/07/25/voicenotes-my-first-twilio-app/</guid>
          <link>http://your-web-site.com/articles/2010/07/25/voicenotes-my-first-twilio-app/</link>
        </item>
    
        <item>
          <title>Push to Heroku from a Branch of Your Local Git Repository (other than master)</title>
          <description>&lt;p&gt;We spent some time searching for a bit of git hocus pocus to solve this one&amp;hellip;here&amp;rsquo;s the spell:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git push heroku &amp;lt;branch_name&amp;gt;:master&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Our situation:
1. A production server
2. A staging server
3. A sandbox server&lt;/p&gt;

&lt;p&gt;We have a branch in our git repo for the sandbox server &amp;amp; needed to be able to push straight from that, not from master.  The little colon did the trick!&lt;/p&gt;

&lt;p&gt;A couple resources:
* &lt;a href=&quot;http://www.mail-archive.com/heroku@googlegroups.com/msg04039.html&quot;&gt;http://www.mail-archive.com/heroku@googlegroups.com/msg04039.html&lt;/a&gt;
* &lt;a href=&quot;http://suitmymind.com/blog/2009/06/02/deploying-multiple-environments-on-heroku-while-still-hosting-code-on-github/&quot;&gt;http://suitmymind.com/blog/2009/06/02/deploying-multiple-environments-on-heroku-while-still-hosting-code-on-github/&lt;/a&gt;&lt;/p&gt;
</description>
          <pubDate>Wed, 24 Feb 2010 20:47:39 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2010/02/24/push-to-heroku-from-a-branch-of-your-local-git-repository-other-than-master/</guid>
          <link>http://your-web-site.com/articles/2010/02/24/push-to-heroku-from-a-branch-of-your-local-git-repository-other-than-master/</link>
        </item>
    
        <item>
          <title>Git Workshop Retrospective</title>
          <description>&lt;p&gt;I was elated with how well the workshop was received.  All 22 open spots were taken on meetup.com and we had 100% of those people show up!  There were still around 12 people on the waiting list.  Five women participated (including me), making the gender balance 23% female&amp;hellip;not too shabby! Everyone was snug in our small space at Blazing Cloud, but it worked.&lt;/p&gt;

&lt;p&gt;I think that the hands on approach was very effective.  First I had everyone pair off and work together to research one of the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;when to use cherry-pick&lt;/li&gt;
&lt;li&gt;when to use checkout (branch &amp;amp; files)&lt;/li&gt;
&lt;li&gt;when to use merge&lt;/li&gt;
&lt;li&gt;when to use reset&lt;/li&gt;
&lt;li&gt;when to use revert&lt;/li&gt;
&lt;li&gt;when to use rebase&lt;/li&gt;
&lt;li&gt;when to use branch vs stash&lt;/li&gt;
&lt;li&gt;how to ignore files&lt;/li&gt;
&lt;li&gt;find as many ways to add &amp;amp; commit as you can (all the options &amp;amp; flags, what they do)&lt;/li&gt;
&lt;li&gt;how to delete files properly&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Then each pair reported back with their findings.  The discussion was great, made even better when Brian Colfer, my co-organizer &amp;amp; git expert came by and explained complex git concepts articulately.&lt;/p&gt;

&lt;p&gt;We switched gears and each pair completed an exercise I prepared.  All the materials for the exercise are online at &lt;a href=&quot;http://gitworkshop.com&quot;&gt;gitworkshop.com&lt;/a&gt;.  The scenario included a boss who barked out indecisive orders that gave us opportunities to &lt;code&gt;git reset&lt;/code&gt;, &lt;code&gt;git revert&lt;/code&gt;, &lt;code&gt;git stash&lt;/code&gt;, &lt;code&gt;git cherry-pick&lt;/code&gt;, &lt;code&gt;git merge&lt;/code&gt; and &lt;code&gt;git branch&lt;/code&gt;.  I learned a ton creating the tutorial (spent at least 12 hours doing it&amp;hellip;plenty of time to get a good grasp of git).&lt;/p&gt;

&lt;p&gt;My impression was that the participants learned a lot and had a good time!&lt;/p&gt;
</description>
          <pubDate>Wed, 24 Feb 2010 20:35:40 GMT</pubDate>
          <guid>http://your-web-site.com/articles/2010/02/24/git-workshop-retrospective/</guid>
          <link>http://your-web-site.com/articles/2010/02/24/git-workshop-retrospective/</link>
        </item>
    
    
  </channel>
</rss>


