Random Code Fragments


Unity3D web player preferences

Unity3D web player stores player preferences here:  /Library/Preferences/Unity/WebPlayerPrefs/ using this script api: http://docs.unity3d.com/ScriptReference/PlayerPrefs.html


.gitconfig file

cat ~/.gitconfig

    excludesfile = /Users/antonyh/.gitignore_global
    name = Antony Hutchison
    email = [email protected]
    default = simple
    fontui = -family Helvetica -size 13 -weight normal -slant roman -underline 0 -overstrike 0
    fontdiff = -family Inconsolata -size 12 -weight normal -slant roman -underline 0 -overstrike 0
    recentrepo = /Users/antonyh/git/project
    ui = true
    username = antonyh

    visual = !gitk 
    cleanup = !git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d
    co = checkout
    br = branch
    ci = commit
    st = status
    unstage = reset HEAD --
    last = log -1 HEAD


Exec command

This will run ‘df’ and print out the output of the command.

"df -h".execute().text

See also http://www.joergm.com/2010/09/executing-shell-commands-in-groovy/


Groovy console

Run arbitrary Groovy scripts: go to http://jenkins-server:port/script