How to set an environment variable in Apache that is passed to CGI scripts
Posted on Tuesday 3 April 2012
Apache has some default set environmental variables that you can use, but when these don't suffice we can set our own environment variables within our virtual host configuration. Some default environmental variables that you can use are:
SERVER_PORT, SERVER_PROTOCOL, SERVER_ADMIN, DOCUMENT_ROOT, HTTP_ACCEPT and so on. Now, let's set our own variable within our virtual host configuration:
<VirtualHost host>
SetEnv THISISANENV yes
...
</VirtualHost>
Some useful terminal shortcuts for mac
Posted on Tuesday 3 April 2012
Jump to Beginning of Line – Control+A
Jump to End of Line – Control+E
Go to Next Line – Control+N
Go to Previous Line – Control+P
Delete Previous Word – Control+W
Delete Line from Cursor to Beginning – Control+U
Delete Line from Cursor to End – Control+K
Get the value from radiobuttons with jquery
Posted on Tuesday 3 April 2012
This is how I do it, but there are numerous ways to get their value.
$('input:radio[name=answer]:checked').val();
Installing and configuring the Oh My ZSH shell
Posted on Tuesday 3 April 2012
Installation
Install using curl
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
Install using wget
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
Change the mac hostname in terminal
Posted on Tuesday 3 April 2012
Just run this command in your terminal and replace "mynewhostname" with your desired hostname:
sudo scutil --set HostName mynewhostname
If you want to know your current hostname just type:
hostname
List git commits in terminal
Posted on Monday 2 January 2012
To get a pretty list of all your commit in your mac terminal use this command:
git log—pretty=format:”%h - %an, %ar : %s”
The list will look like this:
