This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Aegir 1.1 install script for Ubuntu 10.4 LTS (Lucid) servers | |
# (install-aegir-on-ubuntu.sh) | |
# script on Github: https://raw.github.com/doka/install-aegir-on-ubuntu/lucid/install-aegir-on-ubuntu.sh | |
# | |
# run with users with sudo rights | |
# | |
# this script assumes: | |
# - your hostname is: myhost.local (it will be the Aegir admin interface) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function valid_human_name($name) { | |
return preg_match("/^[A-Z][a-zA-Z '&-]*[A-Za-z]$/", $name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Upgrade and install required packages. | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install lamp-server^ | |
sudo apt-get install php5-cli php5-gd php5-curl phpmyadmin | |
# Configure Apache | |
sudo sed -ie 's/AllowOverride None/AllowOverride All/g' /etc/apache2/sites-available/default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Hello Michael, You are great at turning me on." | |
### ---------- | |
### PATH SETTINGS | |
### ---------- | |
PATH=/applications/MacVim/:$PATH | |
### ---------- | |
### Archive | |
### ---------- | |
alias tarc="tar -zcf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Validates a string containing numbers. | |
* | |
* @param $string | |
* A string to validate if it contains numbers. | |
* @return | |
* TRUE or FALSE if it contains numbers. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteCond %{HTTP_HOST} ^example.com [NC] | |
RewriteRule ^(.*)$ http://example.ca/$1 [L,R=301] | |
RewriteCond %{HTTP_HOST} ^example.com$ [NC] | |
RewriteRule ^(.*)$ http://example.ca/$1 [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// jQuery Update Version | |
if ( arg(0) == 'admin' ) { | |
$conf['jquery_update_jquery_version'] = '1.5'; | |
} | |
else { | |
$conf['jquery_update_jquery_version'] = '1.7'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Provides settings. | |
*/ | |
ini_set('session.gc_probability', 1); | |
ini_set('session.gc_divisor', 100); | |
ini_set('session.gc_maxlifetime', 200000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AWS_KEY="" | |
AWS_SECRET="" | |
if [ $# -ne 1 ] | |
then | |
ec2-host --aws-key $AWS_KEY --aws-secret $AWS_SECRET | |
else | |
ssh -i ~/.ssh/key.pem ec2-user@$(ec2-host --aws-key $AWS_KEY --aws-secret $AWS_SECRET $1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery Equal Height Plugin by M. Pezzi | |
* Version: 1.0-alpha (08/13/12) | |
* Dual licensed under the MIT and GPL licences: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
* Requires: jQuery v1.4.2 or later | |
*/ | |
(function($) { |