Category Archives: Techy

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

new iPod and boot issues

I’m finally upgrading my iPod Shuffle to something with a screen! Yesterday, due to the free shipping and free engraving offered, I ordered from Apple online a Product Red iPod Nano. I’m now incredibly excited about it getting here, even though it’ll surely take a week or more for it to get shipped [...]
Posted in Techy | Tagged | 4 Comments

my slugification

I’ve been doing nothing but sleeping, eating, and playing different video games so far during my winter break, and it’s fabulous. I feel like such a slug! I get up a little before noon, eat a bit while playing the Sims, go visit my dad out at my brother’s house construction site, come [...]
Also posted in Video games | Tagged , , , | 5 Comments

vampire and zombie Sims

I bought The Sims 2 Nightlife Friday night and I’ve been playing it like crazy since then. I was very excited about the possibility of having vampire Sims, which was introduced in Nightlife, so I set about finding and then wooing one of the in-game vampires with one of my Sims. I was [...]
Also posted in Video games | Tagged , , , | 41 Comments

using Ruby to rename files and edit their content

Recently at work, the web admin for the computer science department came into our lab and told us that my employer's site was broken. The admin had need to make all .php files not act as PHP scripts, and instead, all files with the extension .sphp would now run as PHP scripts. Since [...]
Also posted in Programming | Tagged , , | 7 Comments

finding invalid foreign keys in Rails

Sometimes it would be useful to tell users of your Ruby on Rails application if there is a problem in the database, such as some foreign keys are invalid. As an example, let's assume you have two models, Book and Author, such that each Book has an author_id which connects with Author via its [...]
Also posted in Programming | Tagged , , , | Leave a comment

DefaultKeyBinding.dict

To make it more convenient for me to take clean notes, as opposed to notes filled with "x^2" and "y_j", I looked into changing the key bindings in OS X.
Also posted in Config files, OS X | Tagged | 1 Comment

.bash_profile

eval `/opt/local/bin/lesspipe.sh` function dir_access_color { local DIR="${1-$PWD}" COLOR=0 [[ -r "$DIR" ]] && COLOR=1 # red [[ -w "$DIR" ]] && COLOR=2 # green tput -S <<<$'bold\nsetaf '"$COLOR" }
Also posted in Config files | Tagged , | Leave a comment | Current music Maria Jose by Federico Aubele

Grub Error 17

Note: if this tutorial doesn’t help you, possibly because fdisk reports your known Linux partition correctly as Linux, you might also try my Grub Error 13 with Grub Error 17 tutorial. I just had an interesting time with trying to boot into Linux on my PC. Last night, I noticed my /boot/grub/menu.lst file had [...]
Also posted in Linux | Tagged , , | 21 Comments

using Javascript and CSS to mark outgoing links

It may be useful to your visitors to know which links will take them off of your site without having to hover over all of them. It might also be a nice touch to mark links pointing to PDF documents, for example, with a little Adobe PDF logo. With the help of Javascript [...]
Also posted in Programming | Tagged , , , , | 4 Comments | Current music The Way I Are by Timbaland

using AJAX to implement a live search

I recently implemented a live search on the quotes page, so I figured I'd give a tutorial on how I did it. A "live" search is like a regular search feature, but if the user has Javascript enabled, the search will run as they type, instead of waiting for them to hit the 'Submit' [...]
Also posted in Programming | Tagged , , , | 1 Comment | Current music Beautiful Liar by Beyonce and Shakira