Google Ads

I just got an iPhone and switched to AT&T after five years on Verizon Wireless. Don’t get me wrong - I really liked Verizon. It’s just that I left my previous employer several months ago, and I knew that resigning a contract meant they’d validate my employment status, realize I was no longer employed there, and cancel my 20% discount.

Fortunately, I discovered that Purdue has a deal with AT&T, so I was able to get 20% off both the voice and data portions of my wireless plan. I knew I wanted a smartphone, and after playing around with the options, there was no denying that the iPhone beat the competition in usability, speed, and general awesomeness.

After I bought my 60GB iPod Photo in 2004, I swore up and down that it was the last Apple product I would buy new - yet here I am, with a shiny new iPhone. So sue me…things change.

Anyhow, I’m big on hacking and tweaking my stuff. My last Verizon phone was a Motorola V325, and I hacked the hell out of it to make it work how I wanted. Naturally, I jailbroke my iPhone within 24 hours of my purchase, so that I could better customize stuff like sounds and the UI.

I’ve been using one of the themes from Super Mario World for the past five years on each of my phones, so I knew I wanted to upload it to my iPhone. Turns out that adding ringtones takes a little work, but it can be done - for free, and with free software. iTunes will only let you create ringtones from songs you’ve downloaded from the iTunes Store. I’m going to show you how to create ringtones from any audio file, whether it’s WAV, MP3, AAC, or anything else.

First off, you need Audacity. This is a free, open-source sound editor that’s been around for awhile. You want to make sure to get the latest beta version, as it includes support for exporting to AAC (.m4a) format. Once you have Audacity, you also need to get the ffmpeg libraries, which will support exporting to multiple formats (including AAC). If this link is dead, try the version here.

You’ll notice that the file format of the downloaded libraries is a little odd (the second link will take you to a .7z version) - if you don’t already have it, 7-Zip will allow you to extract the files. Once you have the files extracted, copy them into the Plugins directory of your Audacity program folder - it should be something like C:\Program Files\Audacity 1.3 Beta (Unicode)\Plug-Ins.

If you want to make MP3 ringtones for phones other than the iPhone, you need the LAME libraries, available here.

Now you can load up Audacity (it’s in your Start Menu once you’ve installed it). The first thing you need to do is tell it where the ffmpeg libraries reside. Click the Edit menu, and select Preferences. Go down to Import/Export, where you’ll see a box about ffmpeg in the top left corner:

ffmpeg-prefs-1

Click Find Library, and browse to the Plugins folder where you extracted the files. You’ll see that a single dll appears - click it, and click Open. You’ll now see something like this:

ffmpeg-prefs-2

Now that Audacity is set up for exporting to AAC, we can start making our ringtones. It’s pretty screenshot-heavy, so click the jump to see the rest.

Read the rest of this entry »

If you’ve visited my site more than once, you might start to notice that the silly little tagline next to the logo in my header changes, in both content and appearance.

This is accomplished by way of a fancy little bit of PHP. The image generation uses the GD library (with FreeType support), and the fonts are all TrueType.

Again, since my Linode didn’t come with anything preinstalled, I needed to install GD first. It seemed like it might be a bit of a pain - the PHP manual page indicates I was going to have to recompile PHP. Fortunately, this was not the case.

I just had to download it from Ubuntu’s package manager…

apt-get install php5-gd

…and add it to the “extensions” section of php.ini…

nano /etc/php5/apache2/php.ini
 
extension=gd.so

…and restart Apache.

apache2ctl -k graceful

Once that’s out of the way, creating the image was remarkably simple - especially since I found a ready-made script that did exactly what I wanted.

The code is pretty long, so hit the jump to see the rest.

Read the rest of this entry »

2008.12.13 [Sat] | 10:43 PM

I spent the better part of today redesigning the site. The new WP 2.7 interface kind of motivated me to revamp things.

Let me know what you think, if you find something broken, etc.

2008.12.12 [Fri] | 07:05 PM

I just installed WordPress 2.7 today. Boy, is it exciting! The entire interface is different, and things can be accomplished much more quickly.

One of the neat features is the ability to add and remove plugins from the web interface. Unfortunately, WordPress only works with FTP and FTPS (FTP over SSL) by default. I don’t have an FTP server installed on my Linode, so I decided to see if I could use SSH instead.

Turns out it’s possible, but it sure was a beast to get up and running. I’ll go through what I did, in case anyone else had as much trouble with this as I did.

First off, you need to install PEAR. This is a nifty little utility that can automatically compile PHP extensions.

Keep in mind that I’m working in Ubuntu 8.04.1 here, and my Linode installation is very stripped down.

First, you need to install the command-line interface for PHP, which allows you to run PHP scripts from a terminal.

apt-get install php5-cli

Seeing as my installation of Ubuntu is devoid of pretty much any extras, I needed to install wget too.

apt-get install wget

Once that’s done, we can install PEAR.

cd /
wget http://pear.php.net/go-pear -O go-pear.php
php go-pear.php

Once the PEAR installation script is running, you need to configure the locations of each of the components. I chose to stick everything in /pear, but you may want to put it somewhere else. I’d recommend keeping option 3 to my setting, though.

1    /
2    /pear/temp
3    /bin
4    /pear
5    /pear/docs
6    /pear/data
7    /pear/tests

Now that PEAR is installed, we can get into installing OpenSSL and the necessary packages to make it work with PHP.

apt-get install openssl
apt-get install lsh-client
apt-get install libssh2-1
apt-get install libssh2-1-dev

With our libraries and packages installed, we can compile our ssh2 extension for PHP.

pecl install -f ssh2-beta

Finally, we need to add the extension to php.ini.

nano /etc/php5/apache/php.ini

Find the section titled “Extensions” and add this line:

extension=ssh2.so

And restart Apache:

apache2ctl -k graceful

In your WordPress admin interface, you should now see an “SSH” option when you go to add, remove, or update files on your server. WordPress provides text boxes to use your private and public SSH keys, but I found I only needed to use one of my user account’s credentials to authenticate to the server.

Google Ads