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
sudo apt-get update | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' | |
sudo apt-get install -y vim curl python-software-properties | |
sudo add-apt-repository -y ppa:ondrej/php5 | |
sudo apt-get update | |
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug |
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/sh | |
## source .git/hooks/prepare-commit-msg.samlpe | |
BRANCH=`git branch | grep '^\*' | cut -b3-` | |
FILE=`cat "$1"` | |
echo "$BRANCH: $FILE" > "$1" | |
case "$2,$3" in | |
merge,) | |
/usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$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
#!/bin/sh | |
#create a folder to hold all global hooks | |
mkdir ~/.git-hooks | |
#download the hook that prepend branch name to the commit message | |
curl https://gist.githubusercontent.com/abbasadel/ff03536b35b36ce9953c6f6a879563e8/raw --output ~/.git-hooks/prepare-commit-msg | |
#make it executable | |
chmod +x ~/.git-hooks/prepare-commit-msg |