Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
list = `git branch --merged`
clean = list.split("\n").map{ |k| k.chomp }.delete_if{ |k| k.include? "*" }
clean.each{ |b|
puts "deleting #{b}"
`git branch -D #{b}`
}
@edeustace
edeustace / ruby_encryption.rb
Created October 17, 2014 17:32
An example of aes encryption in ruby for CoreSpring
require 'openssl'
###
# An implementation of the AES encryption spec
# see: http://www.corespring.org/developer/home#encrypting-player-options
###
class EncryptionHelper
Type = "AES-128-CBC"
#!/bin/bash
# Oracle hasn't updated the Java 1.7u65 installer to support Yosemite,
# so here's a way to get it installed.
# This is actually what I used to get IntelliJ IDEA running, but even
# if you aren't running that IDE, this is a quick script to get Java
# going strong on your fresh install of OS X 10.10
# Install Java 6 for OS X

Keybase proof

I hereby claim:

  • I am edeustace on github.
  • I am edeustace (https://keybase.io/edeustace) on keybase.
  • I have a public key whose fingerprint is 32B8 0A46 3D10 03D7 E9D0 B392 7CBF 23E5 4B33 1B9A

To claim this, I am signing this object:

@edeustace
edeustace / worflow.md
Last active August 29, 2015 14:07
Git workflow for working with Releases

Git workflow for when working with releases.

Basic rules

  • use semver
  • master is the release branch
  • when a release is created the commit is tagged
  • feature branches are children of master and are merged back to master, at which point a release is created/tagged (see above)
  • fix branches are children of the tag the fix is being applied to, once complete a release is created and a new tag is generated, no need to merge back to a release branch. if needed the fix is merged to master and another release/tag is created.

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

//A trait with a function 'do'
trait Thingy {
def do : String
}
//A global object that implements Thingy
object Thingy extends Thingy{
def do = "thing"
}
@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',
@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")