Latest Tweet
- Dropped container of polynesian sauce on floor, fully-open side down. NOTHING CAME OUT. Chick-fil-A, champion of viscous sauces. 4 days ago
- More updates...
Categories
Tags
academia alcohol animals boyfriend cooking databases email forwards family Flickr food friends health Javascript Lexington Linux list Mario math movies music news OS X Perl 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
'But I don't want to go among mad people,' Alice remarked. 'Oh, you can't help that,' said the Cat. 'We're all mad here. I'm mad. You're mad.' 'How do you know I'm mad?' said Alice. 'You must be,' said the Cat. 'or you wouldn't have come here.
— "Alice in Wonderland," Lewis Carroll Syndication
All posts RSS feed
Category Archives: Techy
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
XGL = hot
XGL/Compiz video comparison with OS X Spaces and Vista Aero. Watch those and see which one pwnz which one. I hope getting XGL and Compiz isn’t difficult on my new Ubuntu system.
simple Rails preference storage
So you’ve got some Rails application and you need to store information from the users across their interactions with the app. Here’s a simple, straightforward way to do that.
In your controller:
if params[:option]
@option = session[:option] = params[:option]
elsif session[:option]
@option = session[:option]
else
@option = 'default value'
end
This checks to see if ‘option’ was passed via a parameter in the [...]
Also posted in Programming Tagged programming, Rails, Ruby Leave a comment Current music Post Blue by Placebo
custom shapes in Photoshop
Custom shapes can be very useful for making multiple objects that look the same. For example, say you want several photos to all be cut out of the same shape, like this:
Creating a Custom Shape
Create a blank 200 pixels x 200 pixels image. Select the Rounded Rectangle Tool and set its radius to [...]
Posted in Techy Tagged Graphics, tutorials, Web development 2 Comments Current music They Dance Alone by Sting
new computer and a new layout
I put up a new layout! I’ve been wanting to do work on this site for a while now, but I never have any free time in which I’m not relaxing from work or class. Well, today I had a big full schedule of… nothing, so I decided to work on 3t7. [...]
Illustrator rocks
Oh my goodness, I love Adobe Illustrator. I made this nifty thing in a few minutes:
Also posted in Daily life 7 Comments
if succinctly
In Ruby, if is an expression, not a statement, thus it returns a value. This may not seem useful at first glance, but it lends itself to forming neat, concise code… Like most things in Ruby, actually.
Setting Values Concisely
Say you want to define a variable differently based on the result of an if [...]
go from model to associated table name and back