Quick How To’s

Github Gists

https://gist.github.com/cdated

 

Eclipse

Shortcut to import packages:

 Ctrl-Shift-o

Shortcut automatically format source:

 Ctrl-Shift-f

 

Git

Change default editor for git to vim/emacs/whocares:

 git config --global core.editor emacs

 

Haskell

Run shell commands in the GHCi:

 Prelude> :! command

Determine the current working directory in GHCi:

 Prelude> :! pwd

 

Linux Command Line

Recursively set the sticky bit for the group on /var/www:

 chmod -R g+s /var/www

Add a user to a group:

 gpasswd -a USER GROUP

 

Python

List of files in a directory:

 import glob
glob.glob('./*')

Get the current working directory:

 import os
os.getcwd()

 

SVN

Set the executable property:

 svn propset svn:executable ON FILE

Remove the executable property:

 svn propdel svn:executable FILE