Latest Tweet
- Remember folks: the blue mini neon sour gummi worms are best. 2 weeks ago
- More updates...
Categories
Tags
academia alcohol animals boyfriend cooking databases email forwards family Flickr food friends health Lexington Linux list Mario math movies music news OS X Perl photos PHP politics programming quizzes Rails rants reading Ruby screenshots shopping Sims sports themes tutorials Twilight is ridiculous vehicles video games videos weather Web development work zombies again-
Recent Comments
-
Random Quote
There is always music amongst the trees in the garden, but our hearts must be very quiet to hear it.
— Minnie Aumonier Syndication
All posts RSS feed
Category Archives: Techy
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 Linux, zombies again 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’ [...]
#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 Rails, Ruby 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 Linux, shopping 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 [...]
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 Rails, Ruby 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 programming, Rails, Ruby 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 [...]
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
a Powerbook and a list