Skip to content

Instantly share code, notes, and snippets.

View nilswloka's full-sized avatar

Nils Wloka nilswloka

View GitHub Profile
+ Error stacktraces are turned on.
Maven version: 2.0.10
Java version: 1.6.0_14
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
[DEBUG] Building Maven user-level plugin registry from: 'C:\Users\nwl\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\Entwicklung\Tools\apache-maven-2.0.10\bin\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'cuke4duke'.
[DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins
[DEBUG] Loading plugin prefixes from group: org.codehaus.mojo
@nilswloka
nilswloka / mail-link.scpt
Created October 25, 2010 20:28
Create message link for org-mode
@nilswloka
nilswloka / gist:1152743
Created August 17, 2011 21:54
Extreme Startup with Clojure
(ns extreme-startup-clj.core
(:require compojure.handler)
(:use compojure.core)
(:use ring.adapter.jetty)
(:use clojure.contrib.lazy-seqs))
(declare do-answer)
(defn answer [question]
(let [q (.substring question 10)
@nilswloka
nilswloka / example.clj
Created February 28, 2012 19:12
Use mongeez with congomongo
(ns example
(:use somnium.congomongo)
(:use [somnium.congomongo.config :only [*mongo-config*]])
(:import [org.mongeez Mongeez])
(:import [org.springframework.core.io ClassPathResource]))
(defn migrate-mongo [db]
"Migrates mongodb by using mongeez"
(let [mongo (:mongo *mongo-config*)
mongeez (Mongeez.)]
@nilswloka
nilswloka / gist:3833108
Created October 4, 2012 11:41
Example for Java Quickcheck
@Test
public void equally_named_categories_should_be_equal() {
forAll(names(), new AbstractCharacteristic<String>() {
@Override
protected void doSpecify(String name) throws Throwable {
Category thisCategory = new Category(name);
Category thatCategory = new Category(name);
assertEquals(thisCategory, thatCategory);
}
});
(ns evolvefn) ;; Lee Spector ([email protected]) 20111018
;; This code defines and runs a genetic programming system on the problem
;; of finding a function that fits a particular set of [x y] pairs.
;; The aim here is mostly to demonstrate how genetic programming can be
;; implemented in Clojure simply and clearly, and several things are
;; done in somewhat inefficient and/or non-standard ways. But this should
;; provide a reasonable starting point for developing more efficient/
;; standard/capable systems.
/**
* @license Angular Auth
* (c) 2012 Witold Szczerba
* License: MIT
*/
angular.module('angular-auth', [])
/**
* Holds all the requests which failed due to 401 response,
* so they can be re-requested in the future, once login is completed.
var mod = {};
mod.AuthCtrl = [
'$scope', 'requests401', '$http', 'Ping', '$location', function($scope, requests401, $http, Ping, $location) {
var fadespeed = 300;
$scope.user = {
"username": "test",
"password": "test"
};

Keybase proof

I hereby claim:

  • I am nilswloka on github.
  • I am nwloka (https://keybase.io/nwloka) on keybase.
  • I have a public key ASAYC-l__9sxITx1CcQqQPYZWNTB5dvqJTJnpwx66XshTAo

To claim this, I am signing this object:

@nilswloka
nilswloka / index.js
Last active October 4, 2016 21:10
Use proxyquire to deal with platform specific extensions when writing test for React Native code
import TheModule from 'platform-specific-module';
export default class ComponentUnderTest extends Component {
render() {
return (
<TheModule />
)
}
}