Skip to content

Instantly share code, notes, and snippets.

View mikew1's full-sized avatar

Mike Walker mikew1

View GitHub Profile
@weavejester
weavejester / gist:1982807
Created March 6, 2012 01:47
Initial thoughts on Datomic

Initial thoughts on Datomic

Rich Hickey (of [Clojure][1] fame) has released a cloud-based database called [Datomic][2] that has some interesting properties.

Datomic is an log of assertions and retractions of "facts", much as a DVCS like [Git][3] is a log of code diffs. The state of the database at any one time is the sum of all the assertions and retractions up to that date.

@MightyPork
MightyPork / usb_hid_keys.h
Last active July 18, 2024 08:20
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@malisper
malisper / gist:2d6ec4077f3097559b2206663ae39bec
Created February 24, 2019 18:36
SQL Queries that Produce Fractals
-- Sierpinski's Triangle.
WITH points AS (
SELECT ROW, col FROM generate_series(0, 63) a(ROW)
CROSS JOIN generate_series(0, 63) b(col)
ORDER BY ROW DESC, col ASC
), marked_points AS (
SELECT ROW, col, (CASE WHEN ROW & col != 0
THEN ' '
ELSE '*'
END) AS marker