Skip to content

Instantly share code, notes, and snippets.

View marc0der's full-sized avatar

Marco Vermeulen marc0der

View GitHub Profile
@marc0der
marc0der / gist:3758449
Created September 20, 2012 21:26
Griffon 1.1.0 error
bin/griffon: 140: [: 0: unexpected operator
bin/griffon: 247: exec: /usr/lib/jvm/java-6-openjdk-amd64: Permission denied
@marc0der
marc0der / gist:3910791
Created October 18, 2012 09:51
Add this to your .gitconfig for a colourful log that shows diverging/merging branches.
[alias]
vlog = log --graph --date-order --date=relative --pretty=format:'%C(cyan)%h: %Cblue - %an - %Cgreen %C(cyan)%ar:%Creset%n%s%n' --color
@marc0der
marc0der / gist:3994996
Created November 1, 2012 16:51
Open new files from the command line in new MacVim tabs.
#make sure you have the mvim script on your path already ;-)
alias mvim="mvim --servername VIM --remote-tab $1 &> /dev/null"
@marc0der
marc0der / gist:4077772
Created November 15, 2012 09:59
Iterate over files with spaces in names with bash
find -d /some/directory -type f -depth 1 | grep $ | while read file; do
#perform some work on $file here
done
@marc0der
marc0der / gist:4095013
Created November 17, 2012 11:13
Add environments to Gradle build
def loadConfiguration() {
def environment = hasProperty('env') ? env : 'dev'
ext.environment = environment
println "Environment is set to: $environment"
def configFile = file('config.groovy')
def config = new ConfigSlurper(environment).parse(configFile.toURL())
ext.config = config
}
@marc0der
marc0der / gist:4131836
Created November 22, 2012 15:55
Switches gvm to use the correct version of grails for the current project.
alias switch='cat application.properties | grep app.grails.version | sed "s_app.grails.version=__g" | xargs gvm use grails'
@marc0der
marc0der / deploy-gvm.sh
Created December 3, 2012 14:22
Deploy GVM
#!/bin/bash
ENV="$1"
TAG="$2"
if [[ -z "$ENV" || -z "$TAG" ]]; then
echo "Usage: deploy-gvm <env> <tag>"
exit 0
fi
@marc0der
marc0der / gist:5683790
Created May 31, 2013 09:11
Switch to GVM Beta
export GVM_SERVICE="http://beta.gvmtool.net" && gvm selfupdate
@marc0der
marc0der / gist:5683846
Created May 31, 2013 09:22
Switch to GVM DEV
export GVM_SERVICE="http://dev.gvmtool.net" && gvm selfupdate
@marc0der
marc0der / gist:5684862
Created May 31, 2013 13:07
Install Groovy with GVM
gvm install groovy