Skip to content

Instantly share code, notes, and snippets.

Philipp Meier ordnungswidrig

Block or report user

Report or block ordnungswidrig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View horriblehaskell.hs
{-# LANGUAGE DuplicateRecordFields #-}
-- how to resolve the duplication in CreateUser, BasicUser and UpdateUser
-- without changing everything to `Maybe String`?
data Address = Address { street :: String
, zip :: String
, city :: String
, state :: String
} deriving (Show)
@ordnungswidrig
ordnungswidrig / pres.el
Created Dec 4, 2018
presentation helper for live demo in emacs
View pres.el
(defun c6e/pres-forward ()
(interactive)
(let ((saved (point)))
(forward-line)
(let ((beg (point)))
(search-forward-regexp "^;;; " nil t)
(if (= beg (point))
(goto-char saved)
(progn
(recenter 0)
@ordnungswidrig
ordnungswidrig / gherkinqqwertzde7.json
Created Jun 27, 2017
Gherkin german QWERTZ layout
View gherkinqqwertzde7.json
{"version":1,"keyboard":{"keys":[{"id":0,"legend":"Q","state":{"x":0,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":0,"keycodes":[{"id":"LT()","fields":[1,{"id":"KC_Q","fields":[]}]},{"id":"KC_F1","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_NO","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"W","state":{"x":1,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":1,"keycodes":[{"id":"LT()","fields":[3,{"id":"KC_W","fields":[]}]},{"id":"KC_F2","fields":[]},{"id":"KC_MSTP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","f
View keymap-ergodox-billy-qwertz.h
#include "bootloader.h"
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( // Layer 0
ESC, 1, 2, 3, 4, 5, EQL, // 7
TAB, Q, W, E, R, T, FN1, // 7
LCTRL, A, S, D, F, G, // 6
LSFT, Z, X, C, V, B, FN2, // 7
FN3, NONUS_BSLASH, LCTRL, LALT, LGUI, // 5 L3
@ordnungswidrig
ordnungswidrig / color-overlay-calc-klipse.cljs
Created Feb 2, 2017
Mutliple color overlay functions rendered with reagent in kilpse
View color-overlay-calc-klipse.cljs
;; color definitions in css rgba format
(def base-color [60 151 35 1])
(def overlays [[255 255 255 .23]
[255 255 255 .61]
[255 255 255 1]])
(require '[clojure.string :as s]
'[reagent.core :as reagent])
View docformsmodality.org

Apex architecture on documents, forms and modality

Motivation

During the execution of workflows at certain points information must be presented to the user and information must be gathered from the user. The actualy input method depends on the device that is used by a user, ranging from a web application to filling out a paper form.

The attributes of different devices are collected in “modalities” which describes a group of devices sharing common properties.

The data that shall be collected varies in shape and size, ranging from a single decision (“checkbox”) over what is a

@ordnungswidrig
ordnungswidrig / bananas.clj
Created Jul 20, 2015
Break if control-ch contains a value
View bananas.clj
(def capacity 100)
(let [conn (d/connect db-uri)
tx-report-ch (chan 100)
control-ch (chan)]
(thread
(log/info "Started tx-report thread for " db-uri)
(try (let [queue (d/tx-report-queue conn)]
(while (= ::continue (alts! [control-ch] ::continue))
(when-let [tx-result (.take queue)]
@ordnungswidrig
ordnungswidrig / bye-bye-rfc2616.svg
Created Jun 25, 2015
Bye Bye RFC 2616. Hello RFC 7230!
View bye-bye-rfc2616.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View redirect.clj
(defresource redirected
:exists? false
:existed? true
:moved-permanently? (fn [_] {:location "http://example.com/here/we/go"}))
@ordnungswidrig
ordnungswidrig / grid.ps
Last active Aug 29, 2015
Print rectangular grid
View grid.ps
%!PS-Adobe-3.0
% %%BoundingBox: 0 0 595 842
/inch {72 mul} def
/cm {2.54 div inch} def
/grid { % stack: grid-size, width, height
/h exch def
/w exch def
/s exch def
/width w h lt {w} {h} ifelse def
You can’t perform that action at this time.