Tag Archives: programming

make your Mac listen up

I'm so tickled I can't stand it. All right, so Speech Recognition stuff on a Mac is pretty darn cool by itself, but now I've got a nice Apple Script that opens up Safari with various tabs of my favorite sites, and it does this when I tell my Macbook "Get on it."
Posted in OS X | Also tagged | 5 Comments

chmodding and Ruby

Recently, I switched from a Powerbook to a Macbook, and to copy my files from one to the other, I used a pen drive. Since my pen drive has a FAT file system, it treats everything as being executable. This, however, is not the case on a UNIX-like file system like OS X. In order to save myself the hassle of manually chmodding thousands of files, I wrote this Ruby script.
Posted in Linux, OS X, Programming | Also tagged , , | 2 Comments

database project and dead week

My database project is past the “omigosh are we going to get it done in time??” stage and into the “what neat feature can I add next?” stage, which is a big relief. If you guys want to play with it, I have it here on 3till7.net. We’re doing a demo of it [...]
Posted in Class | Also tagged , | Leave a comment

Paper Mario and Ruby programming

So I’m obviously not doing NaBloPoMo since I haven’t posted anything in about a week, but I do have kind of an excuse: I’ve been doing homework and saving Princess Peach, or trying to. I’ve got a calculus test tomorrow and I’ve been working like mad on my databases project, which is coming [...]
Posted in Class, Daily life | Also tagged , , | Leave a comment

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 [...]
Posted in Programming | Also 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 [...]
Posted in Programming | Also tagged , , | Leave a comment

ACM competition and Ruby/MySQL/OS X troubles

Today has been a very long day. I was up at 7:30 this morning in order to help with the regional ACM programming competition. Jess and I showed up and helped work registration, which involved passing out t-shirts, goody bags, and making sure everyone was registered with a name tag. We then [...]
Posted in Class, Daily life | Also tagged , , | Leave a comment

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 [...]
Posted in Programming | Also tagged , , , | 4 Comments | Current music The Way I Are by Timbaland

using AJAX to spiff up a gallery

Lightbox is nice and all, but sometimes I find it clunky, particularly in Firefox when I have a lot of other tabs open. However, I don't want to go the route of having an image load by itself in the browser, because it would be so much nicer to have it integrated into my [...]
Posted in Programming | Also tagged , , , , | 6 Comments

a busy day, filled with Perlnanigans

Today was one of those kick-ass days that went by in a whirlwind. I had a discrete math test at 9:30 this morning and I think I did really well on it. It seemed only slightly harder than his last one, which was the easiest test he’d given us. After that, I [...]
Posted in Daily life | Also tagged , , | 7 Comments | Current music Born Too Slow by The Crystal Method