Author Archives: Ammon

Use source to import large .sql files

Its true, don’t waste your time with strange scripts and such if you’re trying to upload an .sql file that exceeds the limit. Just give up and use source. Note: don’t be confused that I don’t capitalise my MySQL commands. Its my silent protest against standard MySQL syntax: I think capitalising commands you [...]

Posted in Solutions | Leave a comment

A plug for Lee Howard and Mystery Machine Studio

Lee is the owner and sound engineer at the soon-to-be huge recording studio Mystery Machine Studio in Portland, OR. I built his website (http://www.mysterymachinestudio.com/).
A CD that Lee recorded for local folk/pop hero Nick Jaina was just released to critical acclaim, and we’re trying to drum up some exposure for Lee’s beautiful little [...]

Posted in Musings | Leave a comment

The better way to install LAMP on Ubuntu Karmic 9.10

All this comes from here:
https://help.ubuntu.com/community/ApacheMySQLPHP
In the teminal:

$ sudo tasksel install lamp-server
$ sudo apt-get install phpmyadmin
$ sudo gedit /etc/apache2/apache2.conf

Add the following to the end of this file:  “Include /etc/phpmyadmin/apache.conf”

Edit the /etc/php5/apache2/php.ini file and increase the memory_limit value. I used 64M, but that may be overkill.

Posted in Apache, Linux, Solutions, Ubuntu | Leave a comment

Bash aliases: create your own bash shortcuts!

When I’m building websites especially, I have to work with a lot of deeply nested files. But typing cd ~/public_html/websitename/wp-content/themes/themename/ in the terminal every time is giving me carpal tunnel, so I found a better way:
First open ~/.barshrc in a text editor and uncomment lines 73 through 75 so they look like this:
if [ [...]

Posted in Linux, Solutions, Ubuntu | Leave a comment

How to configure Apache virtual hosting in Ubuntu Karmic 9.10

Before you do anything, back up your original config files. I used to just create a copy of the files with the suffix “.bak” (sudo cp example.conf example.conf.bak), which works, but creates a lot of clutter. Now I use a great little utility called etckeeper which automatically places all files in /etc under [...]

Posted in Apache, Solutions, Ubuntu, Virtual Hosts | Leave a comment

Add Mootools to a Wordpress child theme

The following code, when included in the functions.php file in your Wordpress child theme, will correctly load Mootools and a custom script. This is the only way I am able make custom scripts work, but you hear a lot of stuff out there on the interweb…

<?php
function add_js() {
$stylesheet_dir = get_bloginfo(’stylesheet_directory’);
[...]

Posted in Solutions, Wordpress | Leave a comment

I’m switching to Chrome (on a trail basis)

I thought I would be a Firefox user till I died, but holy crap Chrome is fast! I can launch Firefox, go make a sandwich, launch Chrome and be browsing before Firefox loads. This is particularly nice on our crappy Windows machines at work. JavaScript is noticeably faster. Chrome seems more stable and [...]

Posted in Musings, Software I use | Leave a comment

Wordpress Error: Unable to create directory / Is its parent directory writable by the server?

If you get this error when you try to upload an image to your WordPress blog, there are two things you can do:

Go to Settings > Miscellaneous in your Wordpress admin area and make sure that ‘Store uploads in this folder’ is set to the default: wp-content/uploads (notice there is no ‘/’ before wp-content/uploads).  Try [...]

Posted in Musings | Leave a comment

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 userdir.conf
$ sudo ln [...]

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