Author Archives: Ammon

Use your user’s public_html directory to serve webpages

Using a public_html file in your home directory is much more convenient than /var/www for a local website development environment. The following commands create a file called public_html in your home directory and enable the UserDir module in Apache. From the command line, enter: $ mkdir ~/public_html $ cd /etc/apache2/mods-enabled $ sudo ln -s ../mods-available/userdir.conf [...]

Posted in Musings | Leave a comment

Ubuntu Karmic LAMP stack installation

In the terminal, type: $ sudo apt-get install apache2 $ sudo apt-get install php5 libapache2-mod-php5 php5-mysql $ sudo apt-get install mysql-server $ sudo apt-get install phpmyadmin Just agree when it asks you stuff.

Posted in Solutions, Ubuntu | Leave a comment

Use ‘service’ to start, stop and restart Apache in Ubuntu Karmic

The service service_name command command can be used to start, stop, or restart anything in your /etc/init.d directory. From the command line, use it like this: $ sudo service apache2 start $ sudo service apache2 stop $ sudo service apache2 restart

Posted in Solutions, Ubuntu | Leave a comment

The difference between a working tree, repository, branch, and checkout in the Bazaar version control system

I wish this was in huge type on the front page of the Bazaar web site because it is essential to understanding just what the heck is going on when you place you files under version control. I’m going to use an example to explain this. These events are listed in the order that they [...]

Posted in Musings | Leave a comment

Fixed my site

LastPass, my fave password manager, was doing funny things with WordPress, reposting and deleting my blog posts. Weird. Fixed now.

Posted in Musings | Leave a comment

iPython is super sweet!

You were right Evan, I was lost but now I’m found: http://ipython.scipy.org/moin/ HUGE improvement on the beautiful Python interpreter. Tab completion! Bash commands! Yes!

Posted in Musings | Leave a comment

As if I needed one more reason to hate Microsoft…

Microsoft has now made it impossible to test their stupid browsers with IE Application Compatibility VPC Images on anything but their crappy Virtual PC running on a Windows machine: http://forums.virtualbox.org/viewtopic.php?f=2&t=21712 Ooooohhhh the hate. I hope Bill Gates gets the hugest hemroid in the world for this. I hope it explodes all over his wife’s face.

Posted in VirtualBox | Leave a comment

Something is wrong with my blog

It keeps deleting posts. I’ll figure it out tomorrow.

Posted in Musings | Leave a comment

Execute scripts from the Python interpreter

>>> execfile(‘myscript.py’) # Execute ‘myscript.py’

Posted in Python | Leave a comment

Change current working directory from inside the Python interpreter

This is comes in very handy when working in the Python interpreter: >>> import os >>> os.getcwd() # Returns the current working directory; usually the directory you were in when you started the interpreter >>> os.chdir(‘/path/to/directory’) # Change the current working directory to ‘path/to/directory’. Also accepts bash commands like ‘..’ and ‘/’

Posted in Python | 3 Comments