Love this post

Posted on: Wednesday, February 13th

Seth Godin points out how in just a few years, your perception of very simple things can change. 

Revert for git

Posted on: Tuesday, January 29th

Having recently switched from svn to git, I have been trying to use:

git revert path/to/file

which, of course, does not exist. Here's the git equivalent:

git checkout HEAD path/to/file

The man page is a little, um, obscure.

All Growns Up

Posted on: Friday, January 25th

Khoi Vinh has a great post about growing up and actually purchasing software.  I'm not at his 98% legit status quite yet, but I have had the same epiphany.  I'll make a 45% claim, but that percentage is creeping up monthly.

MLK

Posted on: Tuesday, January 22nd

Being a history nerd, I was surprised that I have never seen Martin Luther King's "I Have a Dream" speech in its entireity.  Today seemed like a good day to take 20 minutes and watch it.

MLK improvised the most memorable part of the speech, starting with "Go back to Mississipi,  Go Back to Alabama...",  through the "I have a dream..." portion. 

The establishment rarely changes anything, people do. 

Breed, Nerds.

Posted on: Monday, January 21st

A CakePHP Apache Optimization Tip

Posted on: Friday, November 23rd
1 comments so far.

This post on the CakePHP google group caught my eye today and my nerd tendencies emerged from their Thanksgiving day too much food and beer hangover.

I will preface this by saying that

  1. I know enough about Apache web server to get by. I'm no expert.
  2. I have not tested this in a production environment.

This optimization tip involves moving the rewrite directives in app/webroot/.htaccess into the apache httpd.conf file.

The default CakePHP .htaccess file looks like this:

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

Here's what I did to move these directives into my /etc/apache2/httpd.conf file. I have my development server setup to use multiple virtual hosts for each of my projects. So for this website, here is what my vhost entry looks like:

<VirtualHost *:80>
	DocumentRoot /www/jc/webroot
	ServerName jc.dev
<Directory /www/jc/webroot>
	AllowOverride None
<IfModule mod_rewrite.c>
		RewriteEngine On
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
</Directory>
</VirtualHost>
The key to this is that your DocumentRoot direcitve is set to the webroot dir.

<< previous
|
next >>