Skip to content

Instantly share code, notes, and snippets.

@hmaurer
hmaurer / 0 - data.md
Created August 4, 2018 18:28 — forked from sundarj/0 - data.md
data: towards enlightenment

data

towards enlightenment

‘It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.’

@hmaurer
hmaurer / SketchSystems.spec
Created June 19, 2018 21:27
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State
@hmaurer
hmaurer / SketchSystems.spec
Created June 19, 2018 01:17
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State
@hmaurer
hmaurer / proxychains.rb
Created June 1, 2018 21:30 — forked from allenhuang/proxychains4_formula.rb
Unofficial brew formula for proxychains 4
# Unofficial brew formula for proxychains 4
# Instruction:
# $ git clone git://gist.github.com/3792521.git gist-3792521
# $ brew install --HEAD gist-3792521/proxychains4_formula.rb
#
# The default config file will be located in /usr/local/etc/proxychains.conf
#
require 'formula'
class Proxychains < Formula
> boot -d http-kit:2.2.0 -s ./ aot -n hello target
> cd ./target
... copy the clojure standard lib in clojure/
> java hello
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.base/java.lang.Class.forName0(Native Method)
@hmaurer
hmaurer / datomic-erasing-data-migration.clj
Created April 28, 2018 11:43 — forked from vvvvalvalval/datomic-erasing-data-migration.clj
Erasing data from Datomic via a manual data migration
;; # EMULATING DATOMIC EXCISION VIA MANUAL DATA MIGRATION
;; *************************************
;; ## Introduction
;; *************************************
;; This Gist demonstrates a generic way to migrate an entire Datomic database
;; from an existing 'Origin Connection' to a clean 'Destination Connection',
;; while getting rid of some undesirable data and otherwise preserving history.
@hmaurer
hmaurer / exclude.sql
Created April 19, 2018 19:42 — forked from fphilipe/exclude.sql
PostgreSQL EXCLUDE constraint
CREATE EXTENSION btree_gist;
CREATE TABLE room_reservations (
room_id integer,
reserved_at timestamptz,
reserved_until timestamptz,
canceled boolean DEFAULT false,
EXCLUDE USING gist (
room_id WITH =, tstzrange(reserved_at, reserved_until) WITH &&
) WHERE (not canceled)
(defn compose-cycles [cycle-a cycle-b]
(let [inv-cycle-a (clojure.set/map-invert cycle-a)]
(reduce-kv
(fn [acc k v]
(cond
(contains? inv-cycle-a k) (assoc acc (get inv-cycle-a k) v)
(contains? cycle-a k) acc
:else (assoc acc k v)))
cycle-a
cycle-b)))
@hmaurer
hmaurer / gist:2a1c1c48dc180d4eb1a7b8ba1d3ad3c4
Created October 7, 2017 23:37 — forked from rtaibah/gist:0922731c452c6d1ab682
Linux Mint 17 + Xmonad on Macbook Pro Retina 15

Base installations

sudo apt-get install blueman build-essentials calcurse chromium-browser cpufrequtils gnupg2 gparted hfsprogs imagemagick linux-tools-common lxappearance mplayer rtorrent ruby skype ubuntu-restricted-essentials urlview vagrant vim xclip

System Configurations

Lastpass

{
object(rid: "2450090569620309683") {
id
children {
rid
name
children {
id
}
}