Skip to content

Instantly share code, notes, and snippets.

@apoo
apoo / gist:2279196
Created April 1, 2012 22:40
Managing multiple SSH Keys for different GitHub Accounts
Create separate SSH key for your personal account and your company. Named them with different extensions in your .ssh folder. Upload them to your github account and finally create a config file for your SSH
Create a config file in ~/.ssh/
vim config:
# PERSONAL ACCOUNT Github
Host github.com-COOL
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_COOL
@apoo
apoo / viTabsToWhitespace
Created April 3, 2012 23:25
Converts Tabs to Whitespaces
In vim:
:set tabstop=4 shiftwidth=4 expandtab
:retab
Or you can set them in your vim config:
set expandtab
set tabstop=4
set shiftwidth=4
map <F2> :retab <CR> :wq! <CR>
@apoo
apoo / git log pretty
Last active December 19, 2015 03:19
Prettifying Git Log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
And every time you need to see your log, just type in
git lg
Or, if you want to see the lines that changed
@apoo
apoo / supervisord.sh
Created June 22, 2014 03:32
supervisord file
#! /bin/bash -e
SUPERVISORD=/usr/local/bin/supervisord
PIDFILE=/tmp/supervisord.pid
OPTS="-c /etc/supervisord.conf"
test -x $SUPERVISORD || exit 0
. /lib/lsb/init-functions