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
git fetch | |
git branch --track branch-name origin/branch-name | |
# From http://stackoverflow.com/a/11262780/682754 |
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
# in-prompt git branch indicator | |
parse_git_branch() { | |
# ref http://pastie.textmate.org/170118 | |
# ref http://www.bramschoenmakers.nl/en/node/511 | |
# ref http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html | |
#also see http://henrik.nyh.se/2008/12/git-dirty-prompt | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' -e 's/\(............\)..*/\1…/' -e 's/\(..*\)/[\1]/' -e 's/^\[master\]$/\x1b[41m&\x1b[0m/' -e 's/^\[test\]$/\x1b[45m&\x1b[0m/' -e 's/^\[demo\]$/\x1b[44m&\x1b[0m/' | |
} | |
PS1="\w \$(parse_git_branch)$ " |
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
# https://stackoverflow.com/questions/3338126/git-how-to-diff-the-same-file-between-two-different-commits-on-the-same-branch/3338145#3338145 | |
git diff old_commit_id..now_commit_id file.php |
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
# Head request and show headers only | |
curl -I www.acooke.org | |
curl --head www.acooke.org |
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
/** @var \Doctrine\DBAL\Connection $connection */ | |
$config = $connection->getConfiguration(); | |
// for excluding an specific table | |
$config->setFilterSchemaAssetsExpression('/^(?!table_name_to_exclude).*$/'); | |
When we try to generate Entities from database, with: | |
$config->setFilterSchemaAssetsExpression('/^(recipes|ingredients).*$/'); | |
# Source: https://coderwall.com/p/jofhdw/doctrine-tell-which-tables-to-work-with |
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
# http://stackoverflow.com/a/20485975/682754 | |
# Log to file | |
#### Turn on and configure | |
SET global log_output = 'FILE'; | |
SET global general_log_file='/tmp/mysql_general.log'; | |
SET global general_log = 1; | |
#### Turn off |
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
# ALIASES | |
## APACHE | |
alias apache-restart='sudo service apache2 restart' | |
alias apache-reload='sudo service apache2 reload' | |
## PHP | |
alias cdd-command='/usr/bin/php /var/www/commands/app/app.php' | |
## 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
# Credit to http://www.iarp.ca/hobby/computing/36-git-committed-and-pushed-to-the-incorrect-branch | |
# Ensure you're in the branch that you commited to by accident. | |
git checkout master | |
# Reset the branch back one commit. | |
git reset --soft HEAD^ | |
# Stash the changes | |
git stash |
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
zend_extension=xdebug.so | |
xdebug.default_enable=0 | |
xdebug.idekey="PHPSTORM" | |
xdebug.remote_enable=1 | |
xdebug.remote_connect_back=1 | |
xdebug.remote_autostart=0 | |
xdebug.remote_port=9000 | |
xdebug.remote_handler=dbgp | |
xdebug.remote_host=localhost |
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
# Assuming the following xdebug.ini is used | |
zend_extension=xdebug.so | |
xdebug.default_enable=0 | |
xdebug.idekey="PHPSTORM" | |
xdebug.remote_enable=1 | |
xdebug.remote_connect_back=1 | |
xdebug.remote_autostart=0 | |
xdebug.remote_port=9000 |