Skip to content

Instantly share code, notes, and snippets.

View torbenbr's full-sized avatar
🚀
Focusing

Torben Brümmer torbenbr

🚀
Focusing
View GitHub Profile
#!/usr/bin/env bash
[ -f $GIT_DIR/MERGE_MSG ] && exit 0
BRANCH_NAME=$(git symbolic-ref --short HEAD)
NUMBER=$(echo $BRANCH_NAME | tr -dc '0-9')
if [ x != x${NUMBER} ]; then
sed -i.back "1s/^/\n\nResolves #$NUMBER /" "$1"
fi
[core]
editor = vim
excludesfile = /home/torben/.gitignore_global
[push]
default = simple
[alias]
a = !git add . && git status
aa = !git add . && git add -u . && git status
ac = !git add . && git commit
acm = !git add . && git commit -m
@torbenbr
torbenbr / .vimrc
Last active October 21, 2022 09:05
set tabstop=2
set shiftwidth=2
set expandtab
set number
set encoding=UTF-8
set list
syntax on
@torbenbr
torbenbr / .bashrc
Last active October 28, 2016 16:50
# [..]
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[32m\]\$(parse_git_branch)\[\033[00m\]$ "
@torbenbr
torbenbr / redis.sh
Last active December 22, 2015 08:49
cd ~
sudo apt-get update
apt-get install php5-dev -y
git clone git://github.com/nicolasff/phpredis.git
cd phpredis
phpize
./configure
@torbenbr
torbenbr / es.sh
Last active December 18, 2015 13:49
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.2.deb
sudo dpkg -i elasticsearch-1.5.2.deb
sudo service elasticsearch start