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
(18:29:14) Trinity: holy shit..something is squacking outside. Syndication
All posts RSS feed
Category Archives: Techy
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. [...]
Also posted in Daily life Tagged hardware, Linux 8 Comments Current music Beautiful Things by Andain
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 [...]
the power of yield and super
The two keywords yield and super allow you to pass control back and forth between parent and child methods, to weave power between a more general method (in the parent class) and a more specific method (in the child class) with ease and logic. Using yield and super effectively can help you maintain the [...]
lots to do
Well, I did it again, dang it: I missed my primary registration window for the second summer term this year, so I’m stuck waiting until April 18th for my secondary window to open up. I don’t understand why there are only certain times that you can register for classes anyway; it pisses me [...]
Internet and taxes
I have the Internet again! Last night, Jess called ResNet and we got excited because they actually moved today’s 7-9 p.m. appointment up to yesterday from 7-9 p.m… Then they didn’t show up. I called back and griped about it, but then got incredibly annoyed when I was told that, not only [...]
leaked Intel memo about Chinese Linux boxes
Intel is offering an affordable computer in rural areas of China. …the product sells for $350 using an inexpensive but high-quality Intel processor, with an expected take rate of 73 percent. The originator of the document believes that they will sell hundreds of millions of units. The operating system marketed with the product uses an [...]
XGL = hot