(See Part 1) And we’re back! So, just take a look up below the title…see that little link? Yeah go ahead and click that. If I did my job right (tested in Safari on Windows, Chrome, FF), the contents for Part 1 should slide in above this post. In this post, since I use the Textile 2 plugin, I add this snippet at the top: In textile land, that translates to a link with a class of remote-inline. Then, I add this lovely javascript: So what that do...
Verbose Logging
software development with some really amazing hairWordpress Multipart Posts, Inlined with jQuery: Part 1
This is the first of a multipart post. I’ll be the first to admit, after you read this, and part 2, ignoring the context and concentrating on the actually content, you’d wonder why, but it makes sense when it’s all together. So I’ve seen many multipart posts out there, do this today, tomorrow do this, and every time, in order to view them all together, you, um, can’t. You have to have multiple tabs open and read one, then read the next, flippi...
Read the full article
LaTex and Fonts
I found this page when trying to figure out how to get LaTeX to use Helvetica. Proved quite useful and insightful. One of the most interesting bits was this note: The dirty little secret here is that when you do this, you might not be getting the true Helvetica but rather it’s very close cousin Nimbus Sans. That might depend on your system, and LaTex setup though. Nevertheless, Nimbus is still far better font type than Arial. My question is ...
Read the full article
ufw and xen - Make them play nice
I was setting up ufw on my server and noticed my xen instances couldn’t do anything. Simple fix, and if you Google that, you’ll find this link at the top. Solves the problem straight up. Xen and UFW on Ubuntu
Read the full article
New Computer
Well I’ve have it up and running for a little while now, but finally got around to writing about it. After 5 years in university (coop program), and coming out with an engineering degree, I figured picking myself up a new gaming rig would be pretty hot. Specs (I just copied from my ncix invoice): Intel Core 2 Quad Q9550 Quad Core Processor LGA775 2.83GHZ Yorkfield 1333FSB 12MB ASUS P5N72-T Premium 780i SLI LGA775 ATX DDR2 3PCI-E16 2PCI-E1 2...
Read the full article
Compile LLVM on Ubuntu
I needed to compile LLVM from scratch since the llvmruby gem needs it compiled with position independent code and the repo version doesn’t seem to be, the gem whines compiling, etc, etc. The docs for LLVM don’t seem to be that great when it comes to compiling this stuff from scratch, so here’s what I did, as one big script chunk. You can probably copy and paste this, but I make no promises that it will work, only that it Works on My Machine. A...
Read the full article
Use Net::SSH with Amazon EC2
I’m writing up some scripts to automate some EC2 setup, and SSH is required. All the examples for Net::SSH show using just a username and password, which is all good, but the Amazon stuff requires a key file. Here’s how to do it: According to the docs, the :keys named param takes an array of file names of private keys to use for publickey and hostbased authentication but even when I give it a string instead of an array of strings, it works f...
Read the full article
Calculating Age
I found this little snippet on stackoverflow This is a strange way to do it, but if you format the date to yyyymmdd and subtract the date of birth from the current date then drop the last 4 digits you’ve got the age :) I don’t know c#, but i believe this will work in any language. 20080814 – 19800703 = 280111 drop the last 4 digits = 28 All credit goes to ScArcher2 This is just a great little snippet of code, and as an upside, dates in that...
Read the full article
Debugging Cucumber on Rails
I like frameworks, but sometimes debugging them is more entertaining. I don’t know why I didn’t think of this method before, but mischa on github has a great little repo showing how you can do it. The README Usage: Add: require ‘ruby-debug’ require ‘cucumber_rails_debug/steps’ To features/support/env.rb Then use: Then debug # opens the debugger or Then what #prints out params, url and html Check it out here
Read the full article
Riding Rails with Selenium
Selenium is a suite of tools to automate web app testing across many platforms. Cucumber is a BDD framework that allows you to write things in English (or whatever language you want, really), and have that execute as code. Put those together with webrat and rspec and you have a pretty mean stack to test your ruby on rails web application with. Sort of. I’ve been having some problems with it, getting it set up, but it’s coming along. This isn’t...
Read the full article