Skip to content

Instantly share code, notes, and snippets.

@cakper
cakper / pre-commit.sh
Last active April 20, 2017 07:57
GIT pre-commit PHPSpec & PHP-CS-Fixer hook
#!/bin/sh
CWD=$(pwd)
STATUS=0
echo "Running PHPSpec and PHPCS"
if [ -f $CWD/bin/phpspec ]
then
$CWD/bin/phpspec run --quiet
mkdir scrutinizer && cd scrutinizer
# Install tools
# - Scrutinizer and composer
wget http://scrutinizer-ci.com/scrutinizer.phar
curl -sS https://getcomposer.org/installer | php
# - All needed CI tools
php composer.phar require h4cc/phpqatools:~1.2
cp -p composer.phar vendor/bin/composer
@anthonysomerset
anthonysomerset / .bashrc
Created November 8, 2011 10:50
bashrc fragment for mac users
myssh-copy-id()
{
cat ~/.ssh/id_rsa.pub | ssh $1 "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
}
alias ssh-copy-id=myssh-copy-id