Monthly Archives: July 2006

Code Highlighting

Google and TextMate come through again.
Found this post on using TextMate for coloring code in blog posts. Works great – except for a couple of tab issues, see post blow the comments should be aligned and the bottom ‘if’ statement is kinda wacky – I swear in my code it’s all indented properly!
Now [...]

Posted in Misc. | Leave a comment

Rails StringIO File Upload

# UPDATE
It turns out the method below works unless your file is below a certain file size (which I haven’t figured out yet but it’s around 15k). If your file is too small it will be StringIO not a Tempfile. So how do we check it then? By the file size, if it’s 0 then [...]

Posted in Ruby on Rails | 9 Comments

Django issues (or issues with Django)

My initial exuberance with Django has been tempered a bit by trying to get it to run on a production server. Getting Rails to run was a snap compared to getting Django to run on a Plesk server.
Once I realized I had to install an earlier version of mod-python (3.1.4) and finally got it running [...]

Posted in Misc. | 2 Comments

Unix commands 101

Some basic Unix/Linux commands that are also helpful on OS X’s Terminal.
‘ls’ lists the contents of a directory
ls‘cd’ change directory (go into a directory)
cd [directory name]‘mv’ move a file or directory
mv [directory] [new/location]‘rm’ remove a file or directory (directory must be empty)
rm [fileToDelete]‘rm -rf’ remove a directory AND it’s contents (without confirmation)
rm -rf [aDirecotyFullofStuff]
‘du -s [...]

Posted in OS X | Leave a comment

How To: Install Django on OS X (Tiger 10.4)

Django is a web framework similar to Ruby on Rails, it’s crown jewel is a built in admin/CMS system that saves tons of time when setting up a dynamic site.
Django is pretty easy to install, if you have the correct version of Python, if you have MySQLdb for Python, if you know how add apps/scripts [...]

Posted in OS X | 20 Comments