Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / gist:15e8613c8fcd9ac27a45
Created May 9, 2014 14:50
Special characters - input method (quoted from haskell-cafe)
Nick Rudnick <nick.rudnick@gmail.com>
25. Apr.
an Haskell
Nachricht ΓΌbersetzen
Deaktivieren fΓΌr: Englisch
Thanks for the hint =)
@573
573 / gist:a1079dcbb648a25a83ae
Created October 1, 2014 14:52
Didnt know smth like that is valid...
// java class
...
@Rule public ExpectedException exc;
...
@Test
public void testLoggingOnXRule() throws IOException {
(exc = ExpectedException.none()).expect(org.drools.runtime.rule.ConsequenceException.class);
(exc = ExpectedException.none()).expectMessage(StringStartsWith.startsWith(MessageFormat.format("Exception executing consequence for rule {0} in defaultpkg: java.lang.NullPointerException", "\"X Rule\"")));
@573
573 / README.md
Last active August 29, 2015 14:13 — forked from aweijnitz/Vagrantfile

Reused that box description for proof-of-concept jenkins-in-a-box for M$-bound developers.

The ssh-call to ssh into the once enrolled box was (information per vagrant ssh-config):

$ ssh vagrant@127.0.0.1 -p 2200 -i /d/tools/vagrant-aweijnitz/.vagrant/machines/default/virtualbox/private_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o LogLevel=FATAL

Have to look more deeply on the set of commands vagrant understands, not to forget one of them vagrant reload on changes in the configuration.

On some occasions ssh-add ~/.vagrant.d/insecure_private_key can be useful.

import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
get_db() {
if [ -z "$CABAL_SANDBOX_CONFIG" ]
then
db=""
else
db=$(sed -nr -e 's/^package-db: (.*)/\1/p' "$CABAL_SANDBOX_CONFIG")
if [ $? -ne 0 ]; then exit 1; fi
fi
}
db_cmd() (
@573
573 / launchMaven
Last active August 29, 2015 14:19 — forked from lfo/launchMaven
mvn clean install -Dmaven.surefire.debug=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,address=Maven,suspend=n
# In Netbeans Debug/attachDebugger with
# connector : SharedMemory
# Name : Maven
# Timeout : 10 000
@573
573 / hmindmap.tex
Last active August 29, 2015 14:20 — forked from epsilonhalbe/hmindmap.tex
% Author: Martin Heuschober
% License: CC-BY-4.0
% see https://creativecommons.org/licenses/by/4.0/
\documentclass{article}
\usepackage[paperwidth=55cm
,paperheight=45cm
,left=1cm
,right=1cm
,top=1cm
To run the `ghc-pkg` command with the correct environment, example usage `ghc-pkg list`.
ghc-pkg()
{(
setopt rc_expand_param glob_subst
path=(
# Using gcc4 is experimental, comment first if problems occur
$(/usr/bin/cygpath -u "${__APPS}/mingw-gcc4/libexec/gcc/mingw32/4.4.0")
$(/usr/bin/cygpath -u "${__APPS}/mingw-gcc4/bin")
"$HOME/Anwendungsdaten/cabal/bin"
@573
573 / gist:392670
Created May 6, 2010 20:31
my zshenv.local functions for zsh running with cygwin
# my zshenv.local functions
# ZSH_VERSION == 4.3.9
# ~/.zshenv.local [U1]
# sourced by ~/.zshenv
if [ -n ${functions[loadmsg]} ] ; then
loadmsg "~/.zshenv.local"
else
loadmsg() { echo "\e[1;32m$1\e[0m" }
@573
573 / gist:393693
Created May 7, 2010 16:43
How to build a simple agent in Simphony (simphony.gui.client part, 2)
How to build a simple agent in Simphony (simphony.gui.client part, 2)
---
most files generated by easily editing with Eclipse's Manifest File Editor:
* scenario.rs/model.score (2.xml)
* scenario.rs/scenario.xml (3.xml)