{"@attributes":{"version":"2.0"},"channel":{"title":"Dane Harrigan","link":"http:\/\/daneharrigan.com\/","description":"Recent content on Dane Harrigan","generator":"Hugo","language":"en-us","lastBuildDate":"Fri, 02 May 2025 00:00:00 +0000","item":[{"title":"Tab completion with CDPATH in ksh","link":"http:\/\/daneharrigan.com\/blog\/tab-completion-with-cdpath-in-ksh\/","pubDate":"Fri, 02 May 2025 00:00:00 +0000","guid":"http:\/\/daneharrigan.com\/blog\/tab-completion-with-cdpath-in-ksh\/","description":"<p>I used <code>bash<\/code> and <code>zsh<\/code> for most of my Linux\/BSD life. I switched to <code>ksh<\/code> when\nI started using OpenBSD as my daily driver since that&rsquo;s the default. <code>CDPATH<\/code> is\none of my favorite features of these shells. It allows me to navigate between\nprojects quickly and from anywhere on my file system. For example, if I had\nthree projects, <code>foo<\/code>, <code>bar<\/code>, and <code>baz<\/code>:<\/p>\n<pre tabindex=\"0\"><code>$ ls ~\/Projects\/src\/**\/*\n\/home\/dane\/Projects\/src\/github.com\/dane:\nfoo bar baz\n<\/code><\/pre><p>By exporting my <code>CDPATH<\/code> to <code>CDPATH=$CDPATH:~\/Projects\/src<\/code>, I can navigate\nbetween them:<\/p>"},{"title":"Log For Humans and Machines","link":"http:\/\/daneharrigan.com\/blog\/logging-for-humans-and-machines\/","pubDate":"Tue, 24 Sep 2013 00:00:00 +0000","guid":"http:\/\/daneharrigan.com\/blog\/logging-for-humans-and-machines\/","description":"<p>Logging is one of the easiest ways for an application to communicate information\nto humans or other machines. How many requests has the application received or\nhow quickly has it served responses? How slow are the slowest actions and how\noften do they occur? These can be easily communicated through logs.<\/p>\n<p>We log everything at Heroku. To make logging consumable by humans and machines,\nwe standardized around key-value formatting. With the use of common keys, humans\nand machines can understand what an application is experiencing everywhere.<\/p>"},{"title":"Versioning Your API","link":"http:\/\/daneharrigan.com\/blog\/versioning-your-api\/","pubDate":"Wed, 08 Aug 2012 00:00:00 +0000","guid":"http:\/\/daneharrigan.com\/blog\/versioning-your-api\/","description":"<p>Choosing an API versioning strategy can be difficult. There are many approaches and\neach come with their own pros and cons. Two of the most common practices are to version\nin the URL or with headers. For Heroku&rsquo;s public API we decided to version with the\n<code>Accept<\/code> header.<\/p>\n<h2 id=\"url-versioning-is-dead-simple\">URL Versioning is Dead Simple<\/h2>\n<p>If you&rsquo;re not familiar with URL versioning it&rsquo;s simply having the version number as\npart of the URI, for instance, <code>example.com\/v2\/resources<\/code>. This approach is very clear\nand easy to call in code or at the command-line. The problem I see with URL versioning\nis that it&rsquo;s not forgiving. If\/when the version is no longer available the server will\nreturn a <code>404<\/code> response.<\/p>"},{"title":"People Make Projects Amazing","link":"http:\/\/daneharrigan.com\/blog\/people-make-projects-amazing\/","pubDate":"Sat, 31 Dec 2011 00:00:00 +0000","guid":"http:\/\/daneharrigan.com\/blog\/people-make-projects-amazing\/","description":"<p>We have many amazing open source projects today, but none of them were\njust amazing overnight and none of them would be considered amazing\nwithout the people that have and do contribute to them. Projects\nthemselves are good ideas, but its the people behind them that make\nthem amazing.<\/p>\n<h2 id=\"it-takes-one-bad-experience\">It Takes One Bad Experience<\/h2>\n<p>It&rsquo;s not easy to get people contributing to an open source project, but\nit&rsquo;s really easy to make sure they <em>don&rsquo;t<\/em>. When new people try to get\ninvolved with a project they&rsquo;re excited and eager to participate.\nContacting a mailing list, commenting on a blog post or sending a pull\nrequest is the start of a conversation between the project developers\nand a potential contributor.<\/p>"},{"title":"Rake Tasks 102","link":"http:\/\/daneharrigan.com\/blog\/rake-tasks-102\/","pubDate":"Mon, 21 Jun 2010 00:00:00 +0000","guid":"http:\/\/daneharrigan.com\/blog\/rake-tasks-102\/","description":"<p>This is a follow up post to <a href=\"http:\/\/daneharrigan.com\/articles\/rake-tasks-101\">Rake Tasks 101<\/a>. In the 101 post we\ncreated Rake tasks, setup dependencies and made our tasks reusable by\npassing in parameters. In Rake Tasks 102 we&rsquo;ll be building on those\npractices, interfacing with a Rails environment and leveraging the cron\nto automate our Rake task.<\/p>\n<p>Our tasks will search Twitter for any mentions of &ldquo;daneharrigan&rdquo; and add\nthe most recent to our Tweet model. In this article I&rsquo;m making a few\nassumptions. You&rsquo;re on a Linux\/Unix-based machine. You have <a href=\"http:\/\/rubygems.org\/gems\/twitter\">John\nNunemaker&rsquo;s Twitter gem<\/a> installed in\nyour Rails project. Lastly, your <code>Tweet<\/code> model was built with one of the\ntwo commands:<\/p>"},{"title":"Rake Tasks 101","link":"http:\/\/daneharrigan.com\/blog\/rake-tasks-101\/","pubDate":"Sun, 06 Jun 2010 00:00:00 +0000","guid":"http:\/\/daneharrigan.com\/blog\/rake-tasks-101\/","description":"<p>I&rsquo;ve been working with Rake quite a bit on my current project so I\nthought I&rsquo;d share some beginner tips.<\/p>\n<p>Before I go into Rake, what is it? Rake is a Ruby-based build program.\nRuby on Rails uses Rake quite a bit in it&rsquo;s process. If you&rsquo;ve worked on\na Rails project you&rsquo;ll used one, some or all of the following: rake\ndb:create, rake gems:unpack, rake db:migrate, and rake test. Now that&rsquo;s\nnot all of Rail&rsquo;s Rake tasks, just some common ones.<\/p>"}]}}