Photo feed as Desktop Background Creative Commons License

posted mid-afternoon by Constantinos. Filed under Code, Google, OS X

I first came up with this idea after reading a post on HackerMoJo.com about getting an RSS feed of images as a Screen Saver using a python script. The idea is simple: Take a feed, parse it, and save the photos it links to as numbered images in a folder on the disk, then use that folder as a Screen Saver. Well, as it turns out you can also use that folder as a desktop background, but there are a few improvements that can be made.

First, the script only worked with that particular feed. If you wanted to use a different feed, you would have to change the code. Second, the script would always download all the photos linked to from the feed, thus increasing the load placed on the hosting server. I wanted to use the script to download the photos from Chromasia, which brings me to point number three: some feeds don't link to the large photo, but instead only include a thumbnail. To solve these issues, I created a small application using Google's wonderful App Engine, which takes care of everything. More on how to use this after the jump.
Continue reading “Photo feed as Desktop Background” »

Downloading your code from Google App Engine

posted mid-afternoon by Constantinos. Filed under General

I've started using Google's App Engine since it launched, mostly playing around with Python (always wanted to learn), and setting up a small app to deal with my Desktop Photo Feed script. One irritation I had was that I wanted to share my code with a friend, but the app engine doesn't provide any way of downloading the source code.

One way around this that I found, was a blog post by David Burger on Download Your Code from Google App Engine, where he created a Makefile to do the dirtywork. Because I don't like Makefiles (and have it from good authority that Googlers hate Makefiles too, but that's besides the point - just to reinforce my position), I modified his method to make it slightly more versatile so that it can work well with OS X (tar includes ._* resource fork files which are annoying), and also turn it into a shell script.
Continue reading “Downloading your code from Google App Engine” »

Smooth SSH Passwordless Authentication

posted in the early afternoon by Constantinos. Filed under Code, Terminal

This post first appeared on the Voodoo Finance blog which is maintained by my friend Constantinos Michael, and I’m recreating it here with some extensions so I can find the code more easily when I need it.

Using computers remotely is a big part of what I do. Whether I’m at home and need to connect to a computer in the lab, or in the lab or the road and need to connect to my home computer. The way I (and pretty much most other linux users) is through SSH. If you’ve ever had to open more than one ssh connection however, it gets old pretty quickly. First you need to remember the host (and potentially the port, if it’s not standard) of the machine you’re connecting to, and also your username on that machine. After those are typed in, you need to enter your password every time you initiate a new connection. Well, all of the above can be automated with a few quick keystrokes in the terminal.
Continue reading “Smooth SSH Passwordless Authentication” »

Simulating encrypted physical disk in OS X Creative Commons License

posted in the late evening by Constantinos. Filed under Code, OS X

I’ve always wanted to do this: have my personal files on a memory stick, encrypted, and when I insert the memory stick in a USB port then OS X asks me for a password to decrypt the files. Unfortunately, this functionality isn’t offered directly as you can’t (at least from what I’ve tried and read) encrypt a device directly. What you can do however is create encrypted disk images, and place them in your thumb drive. There are two disadvantages with this method: First the process isn’t automatic, first the drive mounts, then you have to double-click on the encrypted disk image to mount it, and second after you do that you have two volumes on your Desktop. One for the thumb drive, and one for the encrypted image.

Obviously, in my obsessive compulsive need to have everything work as I want them, I didn’t like this. As a result, I created the following scripts (including a folder action) which pretty much simulate the whole experience. These scripts were only tested on 10.5.1, but they should work on at least Tiger.
Continue reading “Simulating encrypted physical disk in OS X” »

Spoofing Leopard’s MAC address

posted in the early evening by Constantinos. Filed under Code, OS X, Terminal

There are many legitimate reasons why someone would want to spoof a system’s MAC address. In my case, my University binds our network ports to a specific computer’s MAC address, and only allows you to reset that address once a week. My problems start when I want to switch my two computers for whatever reason, and connect my smaller iBook to the wall (let’s say I want to keep a web server online, but wish to take my MacBook Pro on the road).
Continue reading “Spoofing Leopard’s MAC address” »

Bandwidth throttling in OS X

posted in the early afternoon by Constantinos. Filed under Code, OS X, Terminal

It’s been a while since my last post, and that’s because I’ve been busy with coursework, so I haven’t had time to mess around with OS X. However there was one feature I needed to figure out out of necessity if anything else. I have certain files I wish to freely share with some friends of mine, and the easiest way for me to do that was put them on my local web server and serve them over http. The only problem with this approach, is that the university has a weekly data transfer limit of 5Gb per week during peak hours, those being between 6pm and midnight. Additionally, local traffic doesn’t count towards that limit, and if that limit is exceeded then my Internet would be blocked and limited to only the local network for the remainder of that week.

Therefore, the solution I was looking for would not require me to turn off my web server (as I’d like to still access it locally), and would ideally simply limit the outgoing traffic automatically between those two times.
Continue reading “Bandwidth throttling in OS X” »

Automatically restart crashed applications Creative Commons License

posted in the late evening by Constantinos. Filed under Code, OS X

I love Quicksilver. If I ever sit on a machine without it, I feel handicapped, like something extremely important is missing. My major gripe with Quicksilver (and, this might just be my setup, I’m not sure), is that it likes to crash a lot. At least 2-3 times a week. And when it crashes, it’s extremely annoying because when I need to start a program up I use, well, Quicksilver!

Updated 2008-01-11: Modified script for Leopard. New script at end of post.

Continue reading “Automatically restart crashed applications” »

Searching Google the way you want

posted in the late evening by Constantinos. Filed under Code, Google

Google is awesome. I don’t even know where to start with all the features they’ve got packed in that tiny little searchbox of theirs. There’s a lot of sites that explain some of these advanced features [google.com], but I’m more interested in the ones I use regularly, or ones that make my search experience easier.

First, I’ll start with the Google by Keyboard search. I first came across this in a Lifehacker article. I liked Google by Keyboard because it allowed me to use the same keyboard shortcuts that I use in Google Reader for my search results. The best part? The post included a link to an .xml file which would enable Firefox to have ‘Google by Keyboard’ as one of the options in it’s search box!
Continue reading “Searching Google the way you want” »

iTunes scripts I can’t live without

posted at around evening time by Constantinos. Filed under Code, OS X

I have few obsessions in my life, and one of those happens to be keeping my iTunes library in some form (and definition) of ‘order’, without having me go completely insane. This involves keeping the ID3 data as accurate as I can make it (very tedious process as I had about 100 songs named Track 3 – Unknown Artist), but that is more or less under control. What I’m working on now is rating all of my music (I’m sure every one has their own rating scheme, and there’s no need to share mine here… Just suffice to say that a 0-star rating means the song hasn’t been reviewed), and also getting as much album artwork to go with iTune’s cover flow so I can use it without looking at the same default image every time…

Doing all this manually would pretty much take up all my time, so over a period of few months (back when I first started dealing with my iTunes library), I built a few applescripts which help me manage all these tasks, and which are bound to keyboard shortcuts in Quicksilver.
Continue reading “iTunes scripts I can’t live without” »

Share Windows XP license between Parallels and Boot Camp

posted in the wee hours by Constantinos. Filed under OS X, Windows

Since my first installation of Boot Camp and Parallels, I’ve kept two separate Windows XP installations on my drive. One on Boot Camp, used for gaming and other resource-intensive tasks, and the other exclusively on Parallels, used for running some random software I come across and also to test the websites I build in IE. The reason I’ve been doing this is because even though Parallels touts being able to run a boot camped windows installation [via lifehacker], you can’t do BOTH (at least not off the shelf). You have a Boot Camp installation that you either run through Parallels, or by itself. The reason for this is that Parallels has to create a new hardware profile which XP picks up as a different machine, and invalidates your installation.

Continue reading “Share Windows XP license between Parallels and Boot Camp” »