Skip to content

Instantly share code, notes, and snippets.

View leif81's full-sized avatar

Leif Gruenwoldt leif81

View GitHub Profile
@leif81
leif81 / java11_exec_exec_pom_example.xml
Last active February 20, 2019 02:10
How I got javafx 11 modules working with the exec:exec plugin
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
#!/bin/bash
# Auto generate the changelog from git
# Leif Gruenwoldt
CHANGELOG="ChangeLog"
tags=`git tag | sort -r`" TAIL"
CURRENT="HEAD"
rm -f $CHANGELOG
@leif81
leif81 / nuget.pri
Last active October 31, 2018 10:05
Poor man's way of adding NuGet packages to your QMake project
# Automatically adds all nuget packages to project file
NUGET_REPOSITORY_PATH = packages
NUGET_PACKAGES = $$system(dir $${NUGET_REPOSITORY_PATH} /B)
for (NUGET_PACKAGE, NUGET_PACKAGES) {
INCLUDEPATH += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/include
CONFIG(debug, debug | release) {
LIBS += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/lib/x64/v120/Debug/*.lib
} else {
LIBS += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/lib/x64/v120/Release/*.lib
@leif81
leif81 / asciidoctor-backends.sh
Created November 5, 2014 15:08
Runs multiple asciidoctor backends (asciidoctor-pdf, asciidoctor-fopub, asciidoctor html + wkhtmlpdf, asciidoctor docbook + pandoc to docx) against the same set of .adoc's for evaluation purposes
#!/bin/bash
# Setup the environment
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OUTPUT_DIR="$BASE_DIR/output"
command -v ruby >/dev/null && RUBY_Installed=true || RUBY_Installed=false
if [ -z "$BUILD_NUMBER" ] ; then BUILD_NUMBER=0 ; fi
# Comment out the toolchains you don't wish to use.
TOOLCHAINS=$TOOLCHAINS" asciidoctorDocx"
@leif81
leif81 / .gitconfig
Created April 10, 2013 14:27
~/.gitconfig
[user]
email = leifer@gmail.com
name = Leif Gruenwoldt
[gui]
gcwarning = false
maxfilesdisplayed = 1000
[color]
ui = auto
[diff]
tool=meld
@leif81
leif81 / .vimrc
Last active December 16, 2015 00:39
My ~/.vimrc
set sw=4
set ts=4
set expandtab
filetype plugin indent on
" Source vimrc from git project root
" https://gist.github.com/leif81/4617337
let project_root = system("git rev-parse --show-toplevel")
let chomped_project_root = project_root[:-2]
let project_vimrc = chomped_project_root."/.vimrc"
@leif81
leif81 / git_project_vimrc.vimrc
Created January 24, 2013 03:10
Keep a project specific .vimrc at the root of your git project repo (e.g. ~/workspace/myproject/.vimrc) and have it sourced when you launch vim from anywhere in your project dir tree. This only works with git repos because we rely on git for determining our project root dir. Put the content of this in your ~/.vimrc
" Source a vimrc from git project root
let project_root = system("git rev-parse --show-toplevel")
" System commands seem to have a trailing newline, so lets get rid of that
let chomped_project_root = project_root[:-2]
let project_vimrc = chomped_project_root."/.vimrc"
if filereadable(project_vimrc)
execute "source" project_vimrc
endif
@leif81
leif81 / ship.sh
Created December 29, 2011 20:10 — forked from reinh/ship.sh
hack and *ship*
#!/bin/sh -x
git checkout master
git merge -
git push origin master
git checkout -
@leif81
leif81 / hack.sh
Created December 29, 2011 19:17 — forked from reinh/hack.sh
*hack* and ship
#!/bin/sh -x
git checkout master
git pull origin master
git checkout -
git rebase master
@leif81
leif81 / jswat_ant.xml
Created September 9, 2011 14:01
'ant debug' target to launch jswat debug session
<target name="debug" depends="build">
<property name="cp" refid="project.classpath"/>
<exec executable="jswat">
<arg value="-J-Djswat.classpath=${cp}"/>
<arg value="-J-Djswat.sourcepath='${src.dir}'"/>
<arg value="-J-Djswat.launch=${main-class}"/>
<arg line="-J-Djswat.jvmopts='${cmd.line.arg.config} ${cmd.line.arg.logging}'"/>
</exec>