By Ammon | Published:
February 25, 2010
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 [ [...]
By Ammon | Published:
February 17, 2010
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 [...]
By Ammon | Published:
February 11, 2010
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’);
[...]
By Ammon | Published:
February 1, 2010
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 [...]
By Ammon | Published:
January 28, 2010
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 [...]
By Ammon | Published:
January 20, 2010
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 [...]
By Ammon | Published:
January 19, 2010
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.
By Ammon | Published:
January 19, 2010
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
By Ammon | Published:
October 20, 2009
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 [...]
By Ammon | Published:
October 9, 2009
LastPass, my fave password manager, was doing funny things with WordPress, reposting and deleting my blog posts. Weird. Fixed now.