Skip to content

{ Monthly Archives } December 2009

Change your Terminal prompt on Mac

I hate the default prompt for the Terminal in Mac.  It usually takes up most of my terminal screen real estate.  It shows me my computer name, my current directory, and who the logged in user is.  I never need to know my computer name.  I rarely need to know who the username is.  If [...]

Uninstall MySQL on Mac

Somehow, I either forgot my password, or I did something to mess up my MySQL instance.  it is a development machine, so I don’t really care about the databases on it.  I just wanted to remove it completely from my machine.  I actually had two copies of mysql installed.  One from Mac Ports and the [...]

Determine mysql socket

netstat -ln | grep mysql

Creating and deploying a Rails app

This documents how I create Ruby on Rails applications and deploy them to my server.  I have created a bare bones apache web server that hosts ruby applications using MySQL.  It also assumes you have Ruby on Rails set up on a Macbook Pro. Server Side User mkdir ~/myrumbleapp mkdir ~/myrumbleapp/www mkdir ~/myrumbleapp/www/current mkdir ~/myrumbleapp/logs [...]

Bare Ubuntu configuration for Ruby on Rails

General Install Ubuntu 9.1 server using the Bare Server option The first thing I like to do is add my account to the /etc/sudoers file. This just guarantees that I can always use sudo, even if I mistakenly mess up my group assignment. sudo visudo # /etc/sudoers root ALL=(ALL) ALL user ALL=(ALL) ALL user should [...]

Even Mac’s blue screen of death is pretty

Well, my hopes of my Mac never crashing were dashed.  I go the equivalent of the Windows blue screen of death.  Since this time, it has also locked up several times.  But even the Mac’s screen of death is pretty… You can’t tell from this picture, but it just looks like a dialog box that [...]

Configuring Ubuntu for a static IP address

The next thing we need to do is to set the network with your static IP addresses. First, edit the /etc/network/interfaces to include the following. # /etc/network/interfaces auto eth0 iface eth0 inet static address xxx.xxx.xxx.xxx gateway xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx This assumes you want the ethernet card on eth0 configured.  After this, we need to configure [...]

Using SSH on Mac to access Ubuntu server 9.10

First, make sure you can SSH to your server. If you need to install ssh on the Ubuntu server, use: sudo apt-get install ssh mkdir ~/.ssh touch ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys chmod 700 ~/.ssh If you are wondering what the touch does, it just creates an empty file if it doesn’t exist.  That way i [...]

Creating a remote GIT repository

Clean, readable code is one of my highest goals when writing code.  I’m always thinking about the next guy, even when the next guy is just me, several months from now.   Nothing is worse than going into spagetti code and not knowing what the heck is going on.  Because of this, I like to refactor [...]

Windows Mobile Smartphone vs Pocket PC

I recently encountered an issue where a Windows Mobile 5 application I wrote wasn’t working on a Windows Mobile 6 smart phone.  This particular phone was in Spain so I was not able to hold it in my hands. Initially I believed it was because I didn’t have the Windows Mobile 6 SDK installed.  I [...]