Skip to content

Instantly share code, notes, and snippets.

@edeustace
edeustace / rm.sh
Last active August 29, 2015 13:56
remove folders older than 10 days
find . -maxdepth 1 -ctime +30 -type d | xargs rm -f
@edeustace
edeustace / gist:8843304
Created February 6, 2014 12:33
start play app in console.
import play.api._
new StaticApplication(new java.io.File("."))
@edeustace
edeustace / TopologicalSorter.scala
Created June 5, 2014 10:46
Another topological sorter in scala
package com.ahum
import scala.annotation.tailrec
object TopologicalSorter {
def sort[T](nodes: (T, Seq[T])*): Seq[(T, Seq[T])] = {
type DepNode = (T, Seq[T])
@edeustace
edeustace / defmulti_key_as_dispatch_value.clj
Created June 15, 2014 13:34
Use the first key in a map as the dispatch value for defmulti
; Example of using the first key in a map as the dispatch value for defmulti
(defmulti foo (fn [x] (first (map key x))) )
(defmethod foo :a [x] ["a -> " x])
(defmethod foo :b [x] ["b -> " x])
(defmethod foo :default [x] ["default -> " x])
(println (foo {:a "a"}))
(println (foo {:b "b"}))
@edeustace
edeustace / index.js
Created July 8, 2014 12:48
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
var context = canvas.getContext("2d")
@edeustace
edeustace / index.js
Created July 8, 2014 12:48
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
var context = canvas.getContext("2d")
@edeustace
edeustace / index.js
Created July 8, 2014 12:48
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
var context = canvas.getContext("2d")
@edeustace
edeustace / index.js
Created July 8, 2014 12:48 — forked from Matt-Esch/index.js
requirebin sketch
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
// 1: Create a function that declares what the DOM should look like
function render(count) {
return h('div', {
style: {
textAlign: 'center',
//A trait with a function 'do'
trait Thingy {
def do : String
}
//A global object that implements Thingy
object Thingy extends Thingy{
def do = "thing"
}

Install Chrome

Launch Chrome

Go to the corespring app

Hit (Apple Key + Alt + i) or go to View > Developer > Developer Tools

You can do this at any time. So if you prefer you can only open it when you see the problem.

Choose 'Network' tab

network