Skip to content

Instantly share code, notes, and snippets.

View nilswloka's full-sized avatar

Nils Wloka nilswloka

View GitHub Profile
nilswloka / patch
Created November 6, 2018 09:00
Patch for Cumulocity TinkerForge drivers (updates library and adds two new bricklets)
# HG changeset patch
# User Nils Wloka <>
# Date 1541494314 -3600
# Tue Nov 06 09:51:54 2018 +0100
# Node ID 0542e026a190318bd7bdfc1267477b81cc5f3e3d
# Parent 29f0c6f1ee55dc29b6ede12d3a8d9e09b349403a
Update TinkerForge library version and add new bricklets.
diff -r 29f0c6f1ee55 -r 0542e026a190 java-agent/pom.xml
--- a/java-agent/pom.xml Wed Oct 03 10:54:28 2018 +0200
nilswloka /
Last active February 1, 2017 23:36
Example for writing appium specs that can run locally and on BuddyBuild via Testdroid.
#!/usr/bin/env bash
export APK_FILE="$BUDDYBUILD_WORKSPACE/android/app/build/outputs/apk/app-release.apk"
echo "Uploading $APK_FILE"
export TESTDROID_FILE=`curl -s --user $TESTDROID_API: -F myAppFile=@$APK_FILE | node -pe "JSON.parse(require('fs').readFileSync('/dev/stdin').toString()).value.uploads.myAppFile"`
echo "Uploaded as $TESTDROID_FILE"
npm run functional-test
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 />

Keybase proof

I hereby claim:

  • I am nilswloka on github.
  • I am nwloka ( on keybase.
  • I have a public key ASAYC-l__9sxITx1CcQqQPYZWNTB5dvqJTJnpwx66XshTAo

To claim this, I am signing this object:

var mod = {};
mod.AuthCtrl = [
'$scope', 'requests401', '$http', 'Ping', '$location', function($scope, requests401, $http, Ping, $location) {
var fadespeed = 300;
$scope.user = {
"username": "test",
"password": "test"
* @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.
(ns evolvefn) ;; Lee Spector ( 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.
nilswloka / gist:3833108
Created October 4, 2012 11:41
Example for Java Quickcheck
public void equally_named_categories_should_be_equal() {
forAll(names(), new AbstractCharacteristic<String>() {
protected void doSpecify(String name) throws Throwable {
Category thisCategory = new Category(name);
Category thatCategory = new Category(name);
assertEquals(thisCategory, thatCategory);
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 [ ClassPathResource]))
(defn migrate-mongo [db]
"Migrates mongodb by using mongeez"
(let [mongo (:mongo *mongo-config*)
mongeez (Mongeez.)]
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)