Skip to content

Instantly share code, notes, and snippets.

@DanThiffault
DanThiffault / vbox_guest_upgrade.sh
Created July 19, 2016 14:27
Virtual Box Guest Additions Upgrade
# First make sure you have a consistent linux kernel & source installed
sudo apt-get install linux-image-3.13.0-92-generic linux-headers-3.13.0-92-generic
sudo reboot
# Check its what you expect
uname -a # should be 3.13.0-92-generic, if not you need to try a newer version/fix this.
# Based on https://gist.github.com/fernandoaleman/5083680
# & https://gist.github.com/zbal/7800423
@DanThiffault
DanThiffault / spec_examples.clj
Created January 16, 2017 02:25
Clojure Spec examples
(ns spec-examples
(:require
[clojure.spec :as s]
[clojure.spec.gen :as gen]
[clojure.future :refer :all]))
;; Define a map called user-info of { :region-id :region :template-id :template }
;; and ensure that the generated regions contain the passed in region-id (same for templates)
(s/def ::region-id (s/and nat-int? #(> % 1000)))