Skip to content

Instantly share code, notes, and snippets.

View dantoncancella's full-sized avatar

Danton Dietze Cancella dantoncancella

View GitHub Profile
#!/bin/bash
# To enable this hook, rename this file to "post-update".
project_folder="/var/www/example"; # Folder where the project live
project_name="Example"; # Project name
remote_upstream="origin"; # Remote server name
upstream_branch="develop"; # Remote upstream branch name
remote_branch="$remote_upstream/$upstream_branch"; # The upstream branch on remote server
apache_user=$(pstree -p | grep -E "apache|httpd" -m1 | rev | cut -d'(' -f1 | rev | tr -d ')' | xargs ps -o user h -p); # Apache user
#!/bin/bash
# To enable this hook, rename this file to "post-update".
project_folder="/var/www/example"; # Folder where the project live
project_name="Example Project"; # Project name
remote_upstream="stage"; # Remote server name
upstream_branch="develop"; # Remote upstream branch name
remote_branch="$remote_upstream/$upstream_branch"; # The upstream branch on remote server
apache_user=$(pstree -p | grep -E "apache|httpd" -m1 | rev | cut -d'(' -f1 | rev | tr -d ')' | xargs ps -o user h -p); # Apache user
@dantoncancella
dantoncancella / fedora_initial_basic_development.sh
Created January 18, 2015 23:32
Feroda 20 initial development installation
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
yum groupinstall -y 'Development tools'
yum install -y httpd php php-devel mysql mysql-server php-mysqlnd php-mssql php-opcache
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@dantoncancella
dantoncancella / pre-commit
Created April 2, 2015 17:08
Simple Code Sniffer pre-commit hook
#!/bin/sh
PHPFILES=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep .php`
# verifica CodeSniffer PHP
if [ "$PHPFILES" != "" ]
then
# verifica arquivos PHP
echo "Executando Code Sniffer..."
./bin/phpcs --warning-severity=0 --standard=PSR2 --encoding=utf-8 -p $PHPFILES
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Behat",
"Behat Features",
"Colorsublime",