Category Archives: Techy

Programming! Also Linux, web design, hardware… But mostly programming.

a Powerbook and a list

Todd ordered a refurbished Macbook off of Apple’s site the other day and he’s anxiously waiting for it to get here. Not only that, I’m anxiously awaiting its arrival. Is that because I’m a sweet girlfriend who wants to see her honey as happy as a kid on Christmas morning? Well, partially, [...]
Also posted in 3till7.net, Daily life | Tagged | Leave a comment | Current music The Nearness of You by Norah Jones

zombies and Atari games

I’m sitting at my brother’s computer fairly nodding off. I’ve been eating popcorn and drinking hot cocoa, so it’s no wonder: warm food does a great job of making me sleepy. Happy Christmas everyone! I made out with a set of knives, a knife sharpener, an electric can opener, a set [...]
Also posted in Daily life | Tagged , | 3 Comments | Current music the Dolphins-Jets game

the many methods to #find things in Rails

For the longest time, I didn’t understand the full power of the various #find methods in Rails. I probably still don’t, but my understanding of them has certainly expanded. I used to use plain #find for everything. If I wanted to find all rows in the table ‘groups’ that had an ‘id’ [...]
Also posted in Programming | Tagged , | Leave a comment

#post method in tests with a different controller

I wanted a #login method in test_helper that would allow me to easily login from any of my functional tests. However, the #post method won’t allow you to set a different controller than the one in the @controller instance variable that’s defined in your test’s #setup. Well, by looking at how the #process method works, [...]
Also posted in Programming | Tagged , | Leave a comment | Current music Let the Reigns Go Loose by The Get Up Kids

new Shuffle

I’m listening to my new iPod Shuffle. :) I ordered it a few days ago and it came today. I just finished filling it with songs and I’ve since been treated to Tom Petty, Placebo, Deftones, and now The Crystal Method; a nice mix. Ooh, and here’s Mary Jane’s Last Dance [...]
Also posted in Daily life | Tagged , | 8 Comments | Current music Mary Jane's Last Dance by Tom Petty

layouts and graphics

I found an awesome tutorial today using RMagick to create some nifty photo collages with a transparent, slide-like photos, and I can’t wait to try it out. I’m installing RMagick now and plan to experiment. Another nifty graphics-related tool that my dad found and sent to me was Fyre: “Fyre is a tool [...]
Also posted in 3till7.net | 1 Comment | Current music 30 Minutes by t.A.T.u.

go from model to associated table name and back

Given a table object, it returns the related string object; e.g. SubAttribute => ’sub-attribute’. Useful if you want to make a list of all your tables with perhaps their fields listed out to the side. Ruby def stringify_table( table, replace_char = ‘-’, pluralize = false )   string = table.to_s.gsub( /([A-Za-z])([A-Z])/, ‘\1‘ << replace_char.to_s << ‘\2‘ )   [...]
Also posted in Programming | Tagged , | Leave a comment | Current music Passenger Seat by Death Cab for Cutie

conditioner for ActiveRecord-friendly conditions from a collection

I frequently have a collection of values that I want to match in an ActiveRecord query, but it would be nice if I could let ActiveRecord handle checking the data and escaping it properly. So, I wrote this method to return ActiveRecord-friendly conditions, such as: ["user_id=? AND job_id=?", 3, 4] based on the ‘raw’ conditions you feed [...]
Also posted in Programming | Tagged , , | Leave a comment | Current music Hung Up by Madonna

XGL/Compiz customizations on Ubuntu

So I’ve got XGL/Compiz up and running and, I must say, it is hot. See the full entry for screenshots of what I’ve done so far. That’s the cube as I’m rotating it. That’s a photo of the city of Baltimore in the background with the capital dome on top of the cube. That’s the [...]
Posted in Techy | Tagged , , | 2 Comments

finally with the new computer

My case came! Freakin’ Newegg got on the ball and sent my replacement case, then Todd got my system put together and I’m installing Ubuntu 6.06 right now. It’s 61% done, and I’m so excited… Eee!
Also posted in Daily life | 2 Comments