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 title() | |
{ | |
header '=' "${1:-}" | |
} | |
function section() | |
{ | |
header '-' "${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
[alias] | |
### | |
### branch | |
### | |
b = branch --all | |
### | |
### checkout | |
### | |
co = checkout |
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
#!/usr/bin/env bash | |
# | |
# Import sql and/or sql.gz table dump into database | |
# | |
# This script looks will import table defined in a symfony/doctrine project directory | |
# with mapping define with annotation. | |
# please consider using the --help option to read more about all the options available. | |
# | |
# |
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
#!/usr/bin/env bash | |
# Note: the file must be named pre-commit, be executable and be located in .git/hooks/ | |
echo "php-cs-fixer pre commit hook start" | |
# This pre-commit check if the files that are going to be committed suits our coding style | |
# The commit will fail when this happens. | |
# | |
# We could try to automatically fix files include in the commit | |
# BUT there are some special cases that makes it impossible to be totally safe/ |
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
namespace :symfony do | |
desc "Check if shared parameters.yml is in sync with release parameters.yml.dist" | |
task :check_parameters, :except => { :no_release => true } do | |
puts "--> <symfony:check_parameters>" | |
distParameters = YAML::load(capture("cat #{release_path}/app/config/parameters.yml.dist")) | |
invoke_command("if [ -f '#{shared_path}/app/config/parameters.yml' ]; then echo -n 'true'; else echo -n 'false'; fi") do |ch, stream, out| | |
if out != 'true' |
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 | |
# Import a dump folder to a database | |
# Will remove the table, view and trigger just before importing each table | |
# Where is located your dumps. | |
# The folder must contain one file per table and must use the .sql.gz extension | |
DUMP_FOLDER="$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
#!/usr/bin/env bash | |
sudo apt-get install -y python-setuptools python-dev libffi-dev libssl-dev sshpass | |
sudo easy_install pip | |
sudo pip install paramiko PyYAML Jinja2 httplib2 six | |
cd $HOME; | |
git clone git://github.com/ansible/ansible.git --recursive | |
cd ./ansible |
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 | |
# | |
# Usage: | |
# GIT_SEQUENCE_EDITOR='/path/to/this/script.sh' git rebase -i [options] [--exec <cmd>] [--onto <newbase>] [<upstream> [<branch>]] | |
# | |
# Description: | |
# This script is used as a GIT_SEQUENCE_EDITOR for the git rebase command | |
# It merge every commit into one single commit | |
# The first commit message is left as is |
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 | |
# First we need to find the big files | |
# source: https://stackoverflow.com/questions/10622179/how-to-find-identify-large-files-commits-in-git-history/20460121#20460121 | |
REPO_URL="git@domain.tld:your-repo-here.git" | |
WORKING_DIR=$(mktemp -d); | |
cd "${WORKING_DIR}" | |
git clone --mirror "${REPO_URL}" source.git; |
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
monolog: | |
handlers: | |
main: | |
type: stream | |
path: "%kernel.logs_dir%/%kernel.environment%.log" | |
level: debug | |
console: | |
type: console | |
bubble: false |