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.’
name: hello-haskell-serverless | |
version: 0.1.0.0 | |
github: "githubuser/hello-haskell-serverless" | |
license: BSD3 | |
author: "Author name here" | |
maintainer: "[email protected]" | |
copyright: "2018 Author name here" | |
extra-source-files: | |
- README.md |
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |
# 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) |
;; # 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. |
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))) |