Skip to content

Instantly share code, notes, and snippets.


Rob "Hurricane" Ashton robashton

View GitHub Profile
View gist:aac1ea98ebd92bf8cab3216fa960b78b

Starter prep the day before

I want a young and fresh starter, so I get it out of storage the day before, so

  • Morning the day before: discard and feed 50g/50g water/flour
  • Evening the day before: discard and feed 50g/50g water flour

Prep on the day

View gist.markdown

On the recent rampant hypocrisy of self-righteous speakers speaking about speaking

There have been quite a few posts and videos made recently, written primarily as preachy lectures about conference behaviour both in and outside the conference.

  • Most of it is hypocritical in more ways than one
  • Nearly all of it is just to gain publicity for the people doing the speaking out
  • Nearly all of it is written in a way as so to be almost entirely unassailable because arguing against some of the points would mean bringing up dirt on all the people or conferences involved

On speaking at the conference

robashton / entity.clj
Created Nov 10, 2013
polymorphism - am I doing it right?
View entity.clj
(defmulti tick (fn [e] (if (:tick e) :custom :default)))
(defmethod tick :custom [entity] ((:tick entity) entity))
(defmethod tick :default [entity]
(-> entity
(update-in [:x] #(+ %1 (:velx entity)))
(update-in [:y] #(+ %1 (:vely entity)))))
(defmulti draw (fn [ctx e] (if (:draw e) :custom :default)))
(defmethod draw :custom [entity] ((:draw entity) ctx entity))
(defmethod draw :default [ctx {:keys [x y w h color]}]
View write-to-stream.clj
(with-open [stream (db/stream-into "key")]
(binding [*out* ( stream)]
(pr 2)
(pr "hello")
(pr { :hello "world"})
(.flush *out*)))
robashton / blah.markdown
Last active Dec 26, 2015
Things I use on linux to make my life amazing
View blah.markdown
  • Xmonad
    • Can open a new terminal with alt-shift-return
    • Can change layout with alt-space
    • Can switch and resize windows using alt-HJKL
    • Can move windows around with shift-alt-JK
    • Alt-1-9 changes workspace
    • Alt-shift-1-9 moves windows to a workspace
  • The apple key
    • I have the Apple Key mapped to CTRL using XModmap
    • Chrome shortcuts are alll based on this - CTRL-W/T/TAB/R
View gist:6358723
(defn circle [x y r]
(.append svg-container "circle")
(.attr "cx" x)
(.attr "cy" y)
(.attr "r" r)))
View gist:6317678
public class Dog
public string Id { get; set; }
public string Name { get; set; }
public string Breed { get; set; }
public void BlindShardingDemo()
var shards = new Dictionary<string, IDocumentStore>
View app
var http = require('http')
http.createServer(function(req, res) {
res.writeHead(200, {
'Content-Type': 'text/html',
'X-GeneratedBy': "NodeJS Bitches",
'X-MadeBy': 'An angry node developer',
'X-Extra': 'Seriously, Fuck rails. Fuck. Fuck. Fuck.'})
robashton /
Last active Dec 18, 2015
Locality and Wasasbi

Fine, so we have the following code

               log.write("Inline logging dude")
View gist:5502563
json {
kv("name", "Rob Ashton")
kv("age", 5)
kv("address") {
kv("number", 444)
kv("line one", "never you mind")
kv("family", {
kv("name", "Gareth Ashton")
kv("relation", "brother")