<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title>Casey Banner</title><description>while(1) { ... }</description><link>http://caseybanner.ca/</link><lastBuildDate>Wed, 12 Oct 2011 21:12:40 +0000</lastBuildDate><generator>Nodelog</generator><item><title>Effectively enabling gzip in nginx</title><guid isPermaLink="false">effectively-enabling-gzip-in-nginx</guid><pubDate>Wed, 12 Oct 2011 21:12:40 +0000</pubDate><link>http://caseybanner.ca/2011/10/12/effectively-enabling-gzip-in-nginx</link><description>Google released their [Page Speed Online](https://developers.google.com/pagespeed/) tool today. Originally available as a [Chrome extension](http://code.google.com/speed/page-speed/), Pagespeed lets you analyze the performance of your page and how it adheres to web best practices. It is a pretty neat tool which developers should be running on their sites before they go live to make sure everything is in order.

One of the thing I was missing was having gzip compression enabled on all my resources. By default, nginx has gzip compression enabled, but only for plain text MIME types. With all the HTML5 sites sporting fancy web fonts these days, compression becomes especially important. 

The `gzip_types` directive inside the `html {}` configutation block lets you specify what MIME types you want to gzip. Check out the `mime.types` file in your nginx configuration directory to see the mappings between MIME types and file extensions. 

Here is how you get gzip compression going for more of the commonly used MIME types for a typical HTML5 site:

    gzip on;
    gzip_types text/plain text/css
               application/x-javascript application/xml
               application/x-font-woff image/svg+xml;
    gzip_vary on;

Javascript, CSS, and web fonts should all be compressed with gzip. Woohoo!
</description></item><item><title>pivotal2trac - Pivotal Tracker to Trac importer</title><guid isPermaLink="false">pivotal2trac-pivotal-tracker-to-trac-importer</guid><pubDate>Fri, 16 Sep 2011 19:08:30 +0000</pubDate><link>http://caseybanner.ca/2011/09/16/pivotal2trac-pivotal-tracker-to-trac-importer</link><description>I recently need to import a bunch of stories from [Pivotal Tracker](https://www.pivotaltracker.com/) into [Trac](http://trac.edgewall.org/). I had quite a few and I didn't want to enter them all by hand, so this is what I came up with: [pivotal2trac](https://github.com/kcbanner/pivotal2trac). 

Hopefully this is useful to someone else!</description></item><item><title>botLog - microblogging with an xmpp frontend</title><guid isPermaLink="false">botlog</guid><pubDate>Mon, 11 Jul 2011 18:51:53 +0000</pubDate><link>http://caseybanner.ca/2011/07/11/botlog</link><description>I've just published [botlog](https://github.com/kcbanner/botlog), the microblogging framework that powers my [awesomeshit](http://awesomeshit.caseybanner.ca/) page. Posts are stored in MongoDb and are managed by sending messages to an XMPP chat bot which generates the html and RSS feed. botLog has evolved substantially since I started that page last November, and I'm pretty happy with where it has ended up.

Initially, I had a CSV file containing all the posts, and a python script that would generate the page and RSS feed. To add a post, I would ssh to my server, add the post to to the CSV file, and re-run the script. This worked fine, as long as I was on a computer I could ssh from; editing files in emacs from an Android phone is not as fun as it sounds.

When I had initally written the generation script, node.js was not what it was today and the phrase 'server-side javascript' would have made me chuckle. However, we have come far! I write almost everything I can in Javascript these days, and I realized that what I wanted to do with botLog would be the perfect application. The plan was to write an XMPP bot which could be used to manage posts.

I've always liked the idea of chat bots as interfaces. They have been used in IRC since the dawn of time to provide users with tools and information. If you've connected to freenode, you've most likely talked to nickserv to register your nick. The #archlinux channel has a bot which provides access to package information. The idea is that as the user you don't need to switch contexts to perform a task; I don't need to go to my browser and google for a link to a package, I can just message the bot.

Writing an XMPP bot in node.js is fairly simple, thanks to [node-xmpp](https://github.com/astro/node-xmpp). I spent an afternoon writing up a bot that responded to a few simple commands, `list`, `post`, and `remove`. Then, all that was needed was to import all my old posts from the CSV into Mongo. When a post is added, the bot uses [jade](http://jade-lang.com/) to render the single html page and the XML for the RSS feed.

Thats the story of botLog! I'm hoping to add some more features in the future, such as template management and perhaps pagination, but so far I'm pretty happy with it.</description></item><item><title>UW Schedule is live!</title><guid isPermaLink="false">uw-schedule-is-live</guid><pubDate>Sat, 23 Apr 2011 23:56:18 +0000</pubDate><link>http://caseybanner.ca/2011/04/23/uw-schedule-is-live</link><description>&lt;p&gt;For the last while I've been working on a social class scheduling site for Waterloo students. Basically, I was getting frustrated with the long (5+ clicks) process of logging in to Quest to see my weekly schedule, so I decided to do something about it.&lt;/p&gt;
&lt;p&gt;I was also motivated by my desire to learn Node.js and the goodness of server-side Javascript. The server is written using &lt;a href=&quot;http://nodejs.org/&quot; target=&quot;_blank&quot;&gt;Node.js&lt;/a&gt;. The libraries I'm using for all the HTTP goodness are &lt;a href=&quot;http://expressjs.com/&quot; target=&quot;_blank&quot;&gt;Express&lt;/a&gt; (routing, middleware), &lt;a href=&quot;https://github.com/senchalabs/connect&quot; target=&quot;_blank&quot;&gt;Connect&lt;/a&gt; (middleware), &lt;a href=&quot;http://jade-lang.com/&quot; target=&quot;_blank&quot;&gt;Jade&lt;/a&gt; (template rendering), and &lt;a href=&quot;http://lesscss.org/&quot; target=&quot;_blank&quot;&gt;Less&lt;/a&gt; (css rendering).&lt;/p&gt;
&lt;p&gt;In the process of writing UW Schedule, I pulled out several components that I had to build into libraries of their own: &lt;a href=&quot;https://github.com/kcbanner/node-cas&quot; target=&quot;_blank&quot;&gt;node-cas&lt;/a&gt; (Node.js Central Authentication System client library), &lt;a href=&quot;https://github.com/kcbanner/facebook-test-users&quot; target=&quot;_blank&quot;&gt;facebook-test-users&lt;/a&gt; (command line utility for managing Facebook test users), and &lt;a href=&quot;https://github.com/kcbanner/connect-mongo&quot; target=&quot;_blank&quot;&gt;connect-mongo&lt;/a&gt; (MongoDB session store for Connect). Node seems to have a great community and I'm happy to contribute back to it.&lt;/p&gt;
&lt;p&gt;More features are in the works, but currently you can sign in (with WatIAM credentials or a normal account), add courses to your schedule, and share your schedule with friends via Facebook.&lt;/p&gt;
&lt;p&gt;If your a Waterloo student, &lt;a href=&quot;http://uwschedule.ca&quot; target=&quot;_blank&quot;&gt;check it out&lt;/a&gt;! Feedback is welcome and appreciated.&lt;/p&gt;
&lt;p&gt;-Casey&lt;/p&gt;</description></item><item><title>Safe Javascript/Asset caching with Node.js and nginx</title><guid isPermaLink="false">safe-javascript-caching-with-nodejs-and-nginx</guid><pubDate>Sun, 17 Apr 2011 21:24:17 +0000</pubDate><link>http://caseybanner.ca/2011/04/17/safe-javascript-caching-with-nodejs-and-nginx</link><description>&lt;p&gt;Most web applications will have a large chunk of Javascript that needs to be available every pageload, one of my applications clocks in at 134k (minified, not gzipped).&lt;/p&gt;
&lt;p&gt;We can easily tell the browser to cache this by setting Expires headers, however, this leads to problems when you roll out a new version: the user has to refresh the page (not simply load it) to get the new version. If you have some inline Javascript, and it gets out of sync with the user's cached version of your static Javascript, then you have problems.&lt;/p&gt;
&lt;p&gt;Fortunetly this problem has been solved elsewhere, and all we have to do is adapt it to Node. Rails does this by appending `?file_mtime` to the url of all assets. When a new version of an asset is deployed, the file modification time changes, thus changing the URL, which in turn causes the browser to request the new version.&lt;/p&gt;
&lt;p&gt;Configuring nginx to set the expires header for the url?timestamp style is discussed in a great article &lt;a href=&quot;http://effectif.com/articles/configure-the-expires-header-on-your-rails-site-with-nginx&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now that nginx is setting a maximum Expires header as appropriate, all we have to do is append the timestamp to all of our URLs:&lt;/p&gt;
&lt;pre class=&quot;sh_javascript&quot;&gt;var findit = require('findit');
var fs = require('fs');

function asset_hrefs(dir) {
  var asset_hrefs = {};
  var files = findit.findSync(dir);
  files.forEach(function(file, i) {
    var href = file.substring(dir.length);
    asset_hrefs[href] = [href, '?', fs.statSync(file).mtime.getTime()].join('');
  });
  return asset_hrefs;
};

// Run this once, when your application starts
var hrefs = asset_hrefs('public');
&lt;/pre&gt;
&lt;p&gt;Pass in the directory where all your static assets live (in my case 'public'), and that function will return an Object that looks like this:&lt;/p&gt;
&lt;pre class=&quot;sh_javascript&quot;&gt;{
  '/js/all.js': '/js/all.js?1303065298000',
   ...
  '/css/style.css': '/css/style.css?1303065297456'
}
&lt;/pre&gt;
&lt;p&gt;So, all you have to do is pass this structure to your view renderer, and use it like so (here I'm using Jade, and I've called the structure hrefs):&lt;/p&gt;
&lt;pre class=&quot;sh_javascript&quot;&gt;script(src=hrefs['/js/all.js'], type=&quot;text/javascript&quot;)
&lt;/pre&gt;
&lt;p&gt;hrefs['/js/index.js'] of course maps to '/js/all.js?1303065298000'. Now the actual url for your Javascript file will change whenever that file is modified, so you never run the risk of the using running old code.&lt;/p&gt;</description></item><item><title>Start using ZSH</title><guid isPermaLink="false">start-using-zsh</guid><pubDate>Tue, 12 Apr 2011 02:49:23 +0000</pubDate><link>http://caseybanner.ca/2011/04/12/start-using-zsh</link><description>&lt;p&gt;&lt;a href=&quot;http://zsh.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;ZSH&lt;/a&gt; is a pretty cool shell, and I've been using it for a while. The main selling point is the really extensive completion support. Check it out:&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;http://www.youtube.com/embed/E2WXc3qAg8A?wmode=Opaque&quot; width=&quot;480&quot; height=&quot;390&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;As you can see, some pretty neat stuff is possible. The only real problem is that zsh has a bit of a learning curve when it comes to configuration; to tell the truth most of my config was pieced together from various blog posts and snippets that I've accumulated since I switched to zsh. The solution here is to of course perpetuate the tradition!&lt;/p&gt;
&lt;p&gt;Check out my .zshrc &lt;a href=&quot;https://gist.github.com/914831&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Minifying Javascript with Jake and UglifyJS</title><guid isPermaLink="false">minifying-javascript-with-jake-and-uglifyjs</guid><pubDate>Mon, 28 Mar 2011 03:05:33 +0000</pubDate><link>http://caseybanner.ca/2011/03/28/minifying-javascript-with-jake-and-uglifyjs</link><description>&lt;p&gt;One of the first things you'll want to do when deploying your shiny new HTML5 app is minify all your Javascript. It saves space, and depending on the minifier, will perform some neat optimizations on your code.&lt;/p&gt;
&lt;p&gt;Recently I had to do this on one of my apps, and I didn't feel like running my files through a minifier by hand; that's what build scripts are for! So, here is how I did it.&lt;/p&gt;
&lt;p&gt;The minifier I've chosen to use is &lt;a href=&quot;https://github.com/mishoo/UglifyJS&quot; target=&quot;_blank&quot;&gt;UglifyJS&lt;/a&gt;, and the build tool is &lt;a href=&quot;https://github.com/mde/node-jake&quot; target=&quot;_blank&quot;&gt;Jake&lt;/a&gt;. You can install both via npm ('uglify-js' and 'jake' are the module names).&lt;/p&gt;
&lt;p&gt;This is the Jakefile that I use to minify all my client-side Javascript into a file called all.js:&lt;/p&gt;
&lt;pre class=&quot;sh_javascript&quot;&gt;var fs = require('fs');
var sys = require('sys');
var uglify = require('uglify-js');

desc('Uglify JS');
task('minify', [], function(params) {
  var files = ['jquery-1.5.min.js',
               'jquery.easing.1.3.js',
               'jquery.boxy.js',
               'jquery.form.js',
               'date.js',
               'util.js',
               'layout.js'];
  
  var all = '';
  files.forEach(function(file, i) {
    if (file.match(/^.*js$/)) {
      all += fs.readFileSync('public/js/'+file).toString();
    }
  });
  
  var ast = uglify.parser.parse(all);
  var out = fs.openSync('public/js/all.js', 'w+');
  ast = uglify.uglify.ast_mangle(ast);
  ast = uglify.uglify.ast_squeeze(ast);
  fs.writeSync(out, uglify.uglify.gen_code(ast));
});
&lt;/pre&gt;
&lt;p&gt;Use Jake the same way you would use make, just run `jake minify`.&lt;/p&gt;</description></item><item><title>CLI Interface to Manage Facebook Test Users</title><guid isPermaLink="false">cli-interface-to-manage-facebook-test-users</guid><pubDate>Sat, 26 Mar 2011 20:32:21 +0000</pubDate><link>http://caseybanner.ca/2011/03/26/cli-interface-to-manage-facebook-test-users</link><description>&lt;p&gt;Facebook released a new &lt;a href=&quot;http://developers.facebook.com/docs/test_users/&quot; target=&quot;_blank&quot;&gt;API&lt;/a&gt;to create and manage test users, however there is currently no nice interface to it (besides curl!). I decided to come up with a fdisk-style management script to handle this problem.&lt;/p&gt;
&lt;p&gt;Check it out here:&lt;a href=&quot;https://github.com/kcbanner/facebook-test-users&quot;&gt;https://github.com/kcbanner/facebook-test-users&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hopefully some other devs can find this useful!&lt;/p&gt;</description></item><item><title>MongoDB Session Store for Connect</title><guid isPermaLink="false">mongodb-session-store-for-connect</guid><pubDate>Thu, 17 Mar 2011 02:37:20 +0000</pubDate><link>http://caseybanner.ca/2011/03/17/mongodb-session-store-for-connect</link><description>&lt;p&gt;Recently, several updates were made to &lt;a href=&quot;https://github.com/senchalabs/Connect&quot; target=&quot;_self&quot;&gt;Connect&lt;/a&gt;, which is a middleware framework for Node applications. One of the great features of Connect is its ability to manage sessions. However, the recent updates broke the old MongoDB session store, connect-mongodb.&lt;/p&gt;
&lt;p&gt;It was failing with the error:&lt;/p&gt;
&lt;pre class=&quot;sh_log&quot;&gt;TypeError: Cannot set property data of #Object which has only a getter&lt;/pre&gt;
&lt;p&gt;It seemed like it wasn't going to be updated, so I decided to try my hand at writing my own Connect 1.0+ compatible MongoDB session store. It was a fun exercise and I learned a bunch about the internal workings of Connect while I was at it.&lt;/p&gt;
&lt;p&gt;Here is the result: &lt;a href=&quot;https://github.com/kcbanner/connect-mongo&quot; target=&quot;_blank&quot;&gt;connect-mongo&lt;/a&gt;. It's also on &lt;a href=&quot;http://search.npmjs.org/#/connect-mongo&quot; target=&quot;_blank&quot;&gt;npm&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Proxying node.js with nginx</title><guid isPermaLink="false">proxying-nodejs-with-nginx</guid><pubDate>Sat, 12 Mar 2011 19:39:14 +0000</pubDate><link>http://caseybanner.ca/2011/03/12/proxying-nodejs-with-nginx</link><description>&lt;p&gt;Sometimes you might want to run nginx in front of node.js in order to serve static content or proxy requests to several node instances.&lt;/p&gt;
&lt;p&gt;Here's how you do it (/etc/nginx/conf.d/virtual.conf):&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;upstream node_blog {
    server 127.0.0.1:12000;
}

server {
    listen      80;
    server_name example.com www.example.com;

    access_log /var/log/nginx/example.access.log;

    root /path/to/docroot/public;

    location ~ /(images|stylesheets|javascripts) {        
        expires max;
    }

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://node_blog/;
        proxy_redirect off;
    }
}
&lt;/pre&gt;
&lt;p&gt;In this example, the node server is running on port 12000 of the localhost. I'm serving the static content with nginx and everything else is proxied to node.&lt;/p&gt;
&lt;p&gt;You can add several upstream blocks, one for each node instance. The main idea is using proxy_pass to proxy the request to node.&lt;/p&gt;</description></item><item><title>Node.js blogging software</title><guid isPermaLink="false">new-nodejs-blogging-software</guid><pubDate>Thu, 10 Mar 2011 05:26:18 +0000</pubDate><link>http://caseybanner.ca/2011/03/10/new-nodejs-blogging-software</link><description>&lt;p&gt;I recently finished the first usable iteration of some node.js blogging software, which I'm calling nodelog. You're seeing it in action right now!&lt;/p&gt;
&lt;p&gt;The reasons I created this in the first place are are slightly bizarre. Firstly, I was running out of resources on my VPS, mostly because PHP and WordPress are rediculous memory hogs, but also because I was simply running too many subdomains/sideprojects/etc. Something had to be done to free up some resources.&lt;/p&gt;
&lt;p&gt;Secondly, there has been a bunch of hype around &lt;a href=&quot;http://nodejs.org/&quot;&gt;node.js&lt;/a&gt; recently, and I'd been waiting for an opportunity to try it out. What better way than to write some blogging software. Two birds with one stone!&lt;/p&gt;
&lt;p&gt;As it turns out, node.js is really great, has a huge whack of libraries for things like routing, middleware, and template rendering, and is fairly lightweight.&lt;/p&gt;
&lt;p&gt;So far I'm really enjoying working with server side javascript. More on this topic soon!&lt;/p&gt;
&lt;p&gt;Check out the project on &lt;a href=&quot;https://github.com/kcbanner/nodelog&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;-Casey&lt;/p&gt;</description></item><item><title>Another Calculus Timelapse</title><guid isPermaLink="false">another-calc-timelapse</guid><pubDate>Tue, 13 Apr 2010 04:00:00 +0000</pubDate><link>http://caseybanner.ca/2010/04/13/another-calc-timelapse</link><description>&lt;p&gt;Huzzah! Its exam time again and I'm back at my usual antics. This is what I did today:&lt;/p&gt;
&lt;p&gt;
&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;400&quot; height=&quot;300&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;
&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&gt;
&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;
&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;
&lt;param name=&quot;src&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=10913958&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;300&quot; src=&quot;http://vimeo.com/moogaloop.swf?clip_id=10913958&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&quot; wmode=&quot;transparent&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://vimeo.com/10913958&quot;&gt;Calculus Timelapse&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user3030085&quot;&gt;Casey Banner&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>In-terminal tabbing with urxvt</title><guid isPermaLink="false">in-terminal-tabbing-with-urxvt</guid><pubDate>Fri, 02 Apr 2010 04:00:00 +0000</pubDate><link>http://caseybanner.ca/2010/04/02/in-terminal-tabbing-with-urxvt</link><description>&lt;p&gt;Not many people know about the built in perl extensions to urxvt. There are a bunch of them, but the one I find most useful is tabbing.  All you have to do is add:&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt; URxvt.perl-ext-common: default,tabbed&lt;/pre&gt;
&lt;p&gt;to your ~/.Xdefaults file, and restart your terminal.You'll get something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.caseybanner.ca/dropbox/2010-04-02-125301_553x327_scrot.png&quot; alt=&quot;&quot; width=&quot;553&quot; height=&quot;327&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The keyboard shortcuts are what make this awesome. Shift-down to create a new tab (or click 'new'), and Shift-left/right to cycle between tabs.&lt;/p&gt;</description></item><item><title>Minimal tracks</title><guid isPermaLink="false">fabrication-of-waves</guid><pubDate>Mon, 29 Mar 2010 04:00:00 +0000</pubDate><link>http://caseybanner.ca/2010/03/29/fabrication-of-waves</link><description>&lt;p&gt;I've been really getting into ambient and minimal stuff. Here are a couple tracks that I've been working on over the past few days.&lt;/p&gt;
&lt;p&gt;
&lt;object width=&quot;100%&quot; height=&quot;81&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fkcbanner%2Fdepth-perception&quot; /&gt;
&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt; &lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;100%&quot; height=&quot;81&quot; src=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fkcbanner%2Fdepth-perception&quot; allowscriptaccess=&quot;always&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;span&gt;&lt;a href=&quot;http://soundcloud.com/kcbanner/depth-perception&quot;&gt;Depth Perception&lt;/a&gt; by &lt;a href=&quot;http://soundcloud.com/kcbanner&quot;&gt;kcbanner&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;object width=&quot;100%&quot; height=&quot;81&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fkcbanner%2Fclean-room&quot; /&gt;
&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt; &lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;100%&quot; height=&quot;81&quot; src=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fkcbanner%2Fclean-room&quot; allowscriptaccess=&quot;always&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;span&gt;&lt;a href=&quot;http://soundcloud.com/kcbanner/clean-room&quot;&gt;Cleanroom&lt;/a&gt; by &lt;a href=&quot;http://soundcloud.com/kcbanner&quot;&gt;kcbanner&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;object width=&quot;100%&quot; height=&quot;81&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fkcbanner%2Fcalculated-scribblings&quot; /&gt;
&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt; &lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;100%&quot; height=&quot;81&quot; src=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fkcbanner%2Fcalculated-scribblings&quot; allowscriptaccess=&quot;always&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;span&gt;&lt;a href=&quot;http://soundcloud.com/kcbanner/calculated-scribblings&quot;&gt;Calculated Scribblings&lt;/a&gt; by  &lt;a href=&quot;http://soundcloud.com/kcbanner&quot;&gt;kcbanner&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Enjoy. If you wanted higher bitrate versions, I would be happy to provide them.&lt;/p&gt;</description></item><item><title>Calculus Timelapse</title><guid isPermaLink="false">calculus-timelapse</guid><pubDate>Tue, 16 Feb 2010 05:00:00 +0000</pubDate><link>http://caseybanner.ca/2010/02/16/calculus-timelapse</link><description>&lt;p&gt;I spent the day studying for my MATH211 midterm, extreme fun was had by all involved. Seriously, things got &lt;strong&gt;dangerous&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;
&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;400&quot; height=&quot;267&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;
&lt;param name=&quot;flashvars&quot; value=&quot;intl_lang=en-us&amp;photo_secret=d9bd8ef4b5&amp;photo_id=4363676023&amp;hd_default=false&quot; /&gt;
&lt;param name=&quot;bgcolor&quot; value=&quot;#000000&quot; /&gt;
&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;
&lt;param name=&quot;src&quot; value=&quot;http://www.flickr.com/apps/video/stewart.swf?v=71377&quot; /&gt;
&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;267&quot; src=&quot;http://www.flickr.com/apps/video/stewart.swf?v=71377&quot; allowfullscreen=&quot;true&quot; bgcolor=&quot;#000000&quot; flashvars=&quot;intl_lang=en-us&amp;photo_secret=d9bd8ef4b5&amp;photo_id=4363676023&amp;hd_default=false&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;I don't know why but I really really like timelapses.&lt;/p&gt;</description></item><item><title>Man + computer</title><guid isPermaLink="false">man-computer</guid><pubDate>Sun, 24 Jan 2010 05:00:00 +0000</pubDate><link>http://caseybanner.ca/2010/01/24/man-computer</link><description>&lt;p&gt;A little experiment.&lt;/p&gt;
&lt;p&gt;
&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;400&quot; height=&quot;300&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;
&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;
&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;
&lt;param name=&quot;src&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=8942755&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;400&quot; height=&quot;300&quot; src=&quot;http://vimeo.com/moogaloop.swf?clip_id=8942755&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://vimeo.com/8942755&quot;&gt;Insight&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user3030085&quot;&gt;Casey Banner&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Nouveau incompatible with nVidia binary driver.</title><guid isPermaLink="false">nouveau-incompatible-with-nvidia-binary-driver</guid><pubDate>Mon, 21 Dec 2009 05:00:00 +0000</pubDate><link>http://caseybanner.ca/2009/12/21/nouveau-incompatible-with-nvidia-binary-driver</link><description>&lt;p&gt;In case your using the nVidia binary driver and are upgrading your kernel to 2.6.32 any time soon, make sure to blacklist the nouveau module in whatever form your distro uses. It seems that the nouveau module is including by default in 2.6.32, which I was unaware of at first.I was getting a strange error when starting X:&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;Failed to initialize the NVIDIA graphics device PCI:1:0:0.
Error opening /dev/nvidia0, Input/Output error.&lt;/pre&gt;
&lt;p&gt;A look into dmesg showed:&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;NVRM: loading NVIDIA UNIX x86 Kernel Module  195.22  Sun Nov 22 16:55:48 PST 2009
vmap allocation for size 16781312 failed: use vmalloc= to increase size.
NVRM: RmInitAdapter failed! (0x26:0xffffffff:1138)
NVRM: rm_init_adapter(0) failed
&lt;/pre&gt;
&lt;p&gt;Hm. So that was strange. As it turns out, if the nouveau module is loaded, it will cause loading the binary nVidia to fail in exactly this way. A quick 'rmmod nouveau' confirmed this was the case.Hopefully this helps anyone who runs into this problem.&lt;/p&gt;</description></item><item><title>Connecting to a WPA WiFi network on Linux (CLI)</title><guid isPermaLink="false">how-to-connect-to-a-wireless-network-using-wpa-on-linux-no-gui</guid><pubDate>Fri, 18 Dec 2009 05:00:00 +0000</pubDate><link>http://caseybanner.ca/2009/12/18/how-to-connect-to-a-wireless-network-using-wpa-on-linux-no-gui</link><description>&lt;p&gt;Most articles make this out to be much more complicated than it needs to be. First, make sure you have wpa_supplicant. On Archlinux:&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;$ sudo pacman -S wpa_supplicant&lt;/pre&gt;
&lt;p&gt;You will need to add your network definition to wpa_supplicant.conf:&lt;/p&gt;
&lt;pre&gt;# wpa_passphrase YOUR_SSID YOUR_PASSPHRASE &gt;&gt; /etc/wpa_supplicant.conf&lt;/pre&gt;
&lt;p&gt;Finally, create a script to bring the interface up. I put mine in ~/scripts/wireless.sh:&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;#!/bin/sh
sudo pkill wpa_supplicant
sudo pkill dhcpcd
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid YOUR_SSID
sudo wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
sudo dhcpcd wlan0
&lt;/pre&gt;
&lt;p&gt;Change your ssid and interface accordingly. Run that script to connect!&lt;/p&gt;</description></item><item><title>Getting Apple keyboard F keys to work on Arch Linux</title><guid isPermaLink="false">getting-apple-keyboard-f-keys-to-work-on-arch-linux</guid><pubDate>Fri, 13 Nov 2009 05:00:00 +0000</pubDate><link>http://caseybanner.ca/2009/11/13/getting-apple-keyboard-f-keys-to-work-on-arch-linux</link><description>&lt;p&gt;You need to do add the following line to /etc/rc.local:&lt;/p&gt;
&lt;pre&gt;echo 2 &gt; /sys/module/hid_apple/parameters/fnmode&lt;/pre&gt;
&lt;p&gt;Via: &lt;a href=&quot;http://bit.ly/dbOq&quot;&gt;http://bit.ly/dbOq&lt;/a&gt;&lt;/p&gt;</description></item><item><title>How to get nice, smooth, X11 fonts in your terminal and editors</title><guid isPermaLink="false">how-to-get-nice-smooth-x11-fonts-in-your-terminal-and-editors</guid><pubDate>Thu, 02 Apr 2009 04:00:00 +0000</pubDate><link>http://caseybanner.ca/2009/04/02/how-to-get-nice-smooth-x11-fonts-in-your-terminal-and-editors</link><description>&lt;p&gt;We all know that bitmap fonts are great, but sometimes its nice to have some smoothing and anti aliasing to make things easier on the eyes. How is this accomplished? By adding this to your ~/.Xdefaults file:&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;Xft.hinting: true
Xft.hintstyle: hintslight
Xft.antialias: true
Xft.rgba: none
Xft.dpi: 96
&lt;/pre&gt;
&lt;p&gt;If your using an LCD you can set Xft.rgba to rgba to do sub-pixel smoothing. Personally I don't like it, but it could just be the LCDs I'm using. Also, if the font your using supports different levels of hinting, you can change Xft.hintstyle to 'hintslight', 'hintsfull', 'hintsmedium', or 'hintsnone'. All fonts seem to do these differently, so you have to experiment a little bit.&lt;/p&gt;
&lt;p&gt;After you change your ~/.Xdefaults, you have to merge it to your current running settings (or restart X, but who wants to do that). Merge your changes with 'xrdb -merge ~/.Xdefaults'. To set different fonts for individual programs, do something like:&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;Emacs.font: Inconsolata-10
&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;urxvt*font: xft:Inconsolata:size=10
&lt;/pre&gt;
&lt;p&gt;You may have to consult your program's man page or docs to see what style it wants the font string in. It seems that every program does it a little bit differently. Hope this was helpful, enjoy easy reading with smooth fonts! I'm using the awesome &lt;a href=&quot;http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released&quot;&gt;Envy Code R&lt;/a&gt; font in my terminal.&lt;/p&gt;</description></item></channel></rss>