Posts tagged code

Track My Snow Leopard Shipment!

If you remember back earlier thi year I had a post about tracking a classic Mac keyboard and mouse from eBay… well I’ve since shipped a few items on Canada Post, Fedex, and Purolator and have come up with a few PHP pages to make these pages viewable on non-secure connections and to eliminate almost all scripting (at the very least make these viewable on cell phones).  I will be releasing the source code to these pages for you to use, but in the meantime you can wait and watching with me as my copy of Snow Leopard ships across the country to me: [bradarsenault.com/track.php].

I’m now at DreamHost!

I’ve been moved over to DreamHost for a total of… three minutes. If you’re interested, here’s what I did:

1. First I logged into my domain via GoDaddy’s SSH, I zip’d all of my files as allfiles.zip via the command zip -r allfiles.zip * This command says to zip (* means wildcard, so everything), the -r means to get subfolders, and the filename allfiles.zip tells it where to put the zip’d files.

2. All said and done that took less than a minute to do, but to transfer the 400MB files took about five minutes.

3. Then I had to login to DreamHost (they provided me with a temporary *.dreamhost.com address to do this, for free) and upload the allfiles.zip, which took just under an hour–so I then went to sleep.

4. This morning I found that bradarsenault.com has finally propagated through the inter-tubes to point to DreamHost, so I logged into bradarsenault.com via SSH and simply did the command unzip allfiles.zip. This took a few seconds and voila-all of my data is now at DreamHost.

5. Databases, I backed up my database last night at GoDaddy and downloaded it (via FTP) this morning. I then created a database at dreamhost with the same name (I know, Steve Gibson, but the passwords and names are REALLY long). From there, I simply chose the import button, uploaded the database.

6. Finally I had to edit the wp-config.php file to point to the new database.

So far, from what I can tell, DreamHost is much faster than GoDaddy, the load averages on my server are a lot lower, and everything feels snap-tastic.

CODE: Message Shown from List

This AppleScript provides a simple function, if you need to show pre-determined text on your screen in a noticeable way, Quicksilver’s ‘Large Type’ function is great. This script allows you to enter the sets of text you need to show in the code then run the script to select the bit to show. To close it, select the “Cancel” button. Their is no reasonable limit to the length of the list. This script requires Quicksilver.



set myMessages to {"message 1", "message 2", "message 3", "message 4", "and so on and so on...."}

repeat

set selectedMsg to {choose from list myMessages}

if (selectedMsg as string) is "false" then --This is to detect if you pressed cancel.
exit repeat
quit
else
tell application "Quicksilver" to show large type (selectedMsg as string)
end if
end repeat
--you could have it do something here, after you've gone to exit the script.