Skip to content

Instantly share code, notes, and snippets.

@hmaurer
hmaurer / CoqIDE bundled with ssreflect.md
Created June 10, 2017 23:34 — forked from rplacd/CoqIDE bundled with ssreflect.md
CoqIDE (8.5pl1, OS X) bundled with ssreflect.

The CoqIDE bundle (8.5pl1, OS X) with ssreflect preinstalled.

coqide-8.5pl1-ssreflect.7z - around 75 MB. (Smaller than the standard CoqIDE bundle!)

A great big caveat: the app bundle is no longer codesigned. If you wish to keep CoqIDE*.app codesigned, install a clean CoqIDE*.app, and replace the Resource/bin and Resources/lib/coq/user-contrib with the ones here.

Sanity testing the installation

I’m sure the reference manual is out of date - instead, I use test cases from the mathcomp/ssrtest folder. Note the new, extended library import paths. Try this, for example:

@hmaurer
hmaurer / README.md
Created June 17, 2017 20:02 — forked from bruth/README.md
Postgres push notification

Postgres push triggers

Watch a table for changes and push a notification with a payload describing the change.

Example

In the Postgres shell:

-- Create the functions
@hmaurer
hmaurer / atom_clojure_setup.md
Created July 7, 2017 00:00 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@hmaurer
hmaurer / GraphQL-Architecture.md
Created July 7, 2017 23:16 — forked from idibidiart/GraphQL-Architecture.md
Building an Agile, Maintainable Architecture with GraphQL

Building a Maintainable, Agile Architecture for Realtime, Transactional Apps

A maintainable application architecture requires that the UI only contain the rendering logic and execute queries and mutations against the underlying data model on the server. A maintainable architecture must not contain any logic for composing "app state" on the client as that would necessarily embed business logic in the client. App state should be persisted to the database and the client projection of it should be composed in the mid tier, and refreshed as mutations occur on the server (and after network interruption) for a highly interactive, realtime UX.

With GraphQL we are able to define an easy-to-change application-level data schema on the server that captures the types and relationships in our data, and wiring it to data sources via resolvers that leverage our db's own query language (or data-oriented, uniform service APIs) to resolve client-specified "queries" and "mutations" against the schema.

We use GraphQL to dyn

#error {
:cause nil
:via
[{:type clojure.lang.Compiler$CompilerException
:message java.lang.StackOverflowError, compiling:(wef_backend/core.clj:1:1)
:at [clojure.lang.Compiler load Compiler.java 7391]}
{:type java.lang.StackOverflowError
:message nil
:at [org.apache.log4j.MDC put MDC.java 22]}]
:trace
(ns wef-backend.core-test
(:require [clojure.test :refer :all]
[datomic.api :as d]
[datomock.core :as dm]
[integrant.core :as ig]
[wef-backend.core :refer :all]
[wef-backend.app.identity :as app.identity]))
(defn- transact-hello-identity [conn]
@(d/transact conn [{:identity/email-address "[email protected]"
{
object(rid: "2450090569620309683") {
id
children {
rid
name
children {
id
}
}
@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

(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 / 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)