Skip to content

Instantly share code, notes, and snippets.

View jillesvangurp's full-sized avatar

Jilles van Gurp jillesvangurp

View GitHub Profile
class Person {
// final fields can be public, no more getter bullshit
public final String name;
public final String sex;
public final int age;
...
// private constructor to be used by Builder only, constructor inject everything in one go and never modify.
@jillesvangurp
jillesvangurp / .gitconfig
Created May 26, 2012 08:57
.gitconfig with my favorite settings
[color]
branch = auto
diff = auto
interactive = auto
status = auto
[user]
name = [...]
email = [...]
[github]
user = [...]
@jillesvangurp
jillesvangurp / .profile
Created May 26, 2012 08:55
profile tweak to get custom git prompt
# brew install bash_completion for this to work ...
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# add current git branch to prompt
PS1='\h:\w\[\033[32m\]$(__git_ps1) \[\033[0m\]$ '
@jillesvangurp
jillesvangurp / jedit_dot_profile_snippet.sh
Created June 2, 2011 14:12
Start Jedit from the command line
# bash function for opening files in jedit (http://www.jedit.org/) from the command line
# copy the line below in your .profile or .bashrc
# the nohup can be used to avoid closing the editor when you close the terminal window from which you launch
function jedit() { nohup java -Xms15M -jar /Applications/jEdit.app/Contents/Resources/Java/jedit.jar -reuseview "$@" > /dev/null 2> /dev/null &}