Skip to content

Instantly share code, notes, and snippets.

@timglabisch
Created February 25, 2014 20:37
Show Gist options
  • Save timglabisch/9217173 to your computer and use it in GitHub Desktop.
Save timglabisch/9217173 to your computer and use it in GitHub Desktop.
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
alias .='grepls'
alias ..='up'
alias s='sudo'
alias fu='pkill'
alias cr="composer require"
alias p="pstorm . &"
alias v="vim"
alias sv="sudo vim"
alias :q=' exit'
alias :Q=' exit'
alias :x=' exit'
alias cd..='cd ..'
alias nano="vim"
alias grep='grep --color=auto'
alias ping='ping -c 5'
grepls() {
if [ $1 != "" ]; then
ls -la | grep --color $1
return 0;
fi
ls -la
}
up() {
LIMIT=$1
if [ "$LIMIT" == "" ]; then
cd ..
return
fi
P=$PWD
for ((i=1; i <= LIMIT; i++))
do
P=$P/..
done
cd $P
}
cdm() {
mkdir -p $1
cd $1
}
export -f cdm
phpd() {
XDEBUG_CONFIG="idekey=fu" \
PHP_IDE_CONFIG="serverName=local" \
php \
-d xdebug.remote_enable=1 \
-d remote_autostart=1 \
-d xdebug.remote_connect_back=1 \
$@
}
export -f phpd
syi() {
composer create-project \
symfony/framework-standard-edition \
. $1
}
sy() {
php app/console $@
}
export -f sy
syg() {
sy $1 | grep --color $2
}
export -f syg
syc() {
rm -rf app/cache/
}
export -f syc
syb() {
sy generate:bundle
syc
}
export -f syb
sye() {
sy generate:doctrine:entity
syc
}
export -f sye
hr() {
echo ""
echo "=========================="
echo ""
}
PS1='\n$(if [[ $? == 0 ]]; then echo "✓"; else echo "✗"; fi) \u $(pwd)\n'
export PATH=/usr/local/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment