Skip to content

Instantly share code, notes, and snippets.

View marc0der's full-sized avatar

Marco Vermeulen marc0der

View GitHub Profile
@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: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: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: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 / prepare-debian-package.sh
Created May 23, 2012 20:28
Prepare Packages for Launchpad
#!/bin/bash
ARCHIVE_FOLDER="$1"
PACKAGE="$2"
VERSION="$3"
RELEASE="$4"
PRIORITY="$5"
if [ -z "$ARCHIVE_FOLDER" -o -z "$PACKAGE" -o -z "$VERSION" -o -z "$RELEASE" -o -z "$PRIORITY" ]; then
echo "Usage: prepare-debian-package <archive folder> <package> <version> <release> <priority>"
@marc0der
marc0der / gist:2369077
Created April 12, 2012 16:52
Deploy jar to Private Webdav Maven repo
mvn deploy:deploy-file
-DgroupId=zzzzz
-DartifactId=yyyyy
-Dversion=2.2.0
-Dpackaging=jar
-Dfile=target/grails-plugin-xxx-2.2.0.jar
-DrepositoryId=my-private-release-repository
-Durl=dav:https://myrepo/release/
@marc0der
marc0der / gist:1650125
Created January 20, 2012 23:08
colourful bash prompt with git branch
#using git-completion script
source ~/bin/git-completion.sh
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]$(__git_ps1 " \[\033[00;31m\](%s)\[\033[00m\]")\$ '
@marc0der
marc0der / gist:1423003
Created December 2, 2011 12:03
Who needs Time Machine?
tar zcvf - /home/dude | ssh dude@backupserver "cat > /backup/dude.tar.gz"
@marc0der
marc0der / gist:1180495
Created August 30, 2011 08:58
Install Groovy on Ubuntu through LaunchPad
$ sudo su -
$ apt-get remove --purge groovy groovy-1.8.1
$ apt-get update
$ apt-get install groovy
$ apt-get install groovy-1.7
$ apt-get install groovy-1.9
$ update-alternatives --list groovy
=================================
@marc0der
marc0der / gist:1086306
Created July 16, 2011 12:29
Install Griffon on Ubuntu through LaunchPad
sudo su -
add-apt-repository ppa:groovy-dev/griffon
apt-get update
#install griffon 0.9.3 stable release
apt-get install griffon-0.9.3
#install griffon 0.9.2 stable release
apt-get install griffon-0.9.2