Skip to content

Instantly share code, notes, and snippets.

@tomzx
tomzx / bootstrap.sh
Created December 4, 2016 00:28 — forked from keo/bootstrap.sh
Setup encrypted partition for Docker containers
#!/bin/sh
# Setup encrypted disk image
# For Ubuntu 14.04 LTS
CRYPTFS_ROOT=/cryptfs
apt-get update
apt-get -y upgrade
apt-get -y install cryptsetup
@tomzx
tomzx / gkm.js
Created July 24, 2016 03:15 — forked from sklink/gkm.js
'use strict';
// TODO: Verify if we're getting loaded from multiples location and prevent creating new child processes?
var EventEmitter2 = require('eventemitter2').EventEmitter2;
var path = require('path');
var spawn = require('child_process').spawn;
var events = new EventEmitter2({wildcard: true});
var javaPath = '';
@tomzx
tomzx / gist:7f79141f423927789475
Last active August 23, 2017 21:06 — forked from sartak/a.md
Anki database notes
-- cards are what you review. easy!
CREATE TABLE cards (
id integer primary key,
-- the epoch milliseconds of when the card was created
nid integer not null,
-- notes.id
did integer not null,
-- deck id (available in col table)
ord integer not null,
-- ordinal, seems like. for when a model has multiple templates, or thereabouts