Skip to content

Instantly share code, notes, and snippets.

View leehambley's full-sized avatar

Lee Hambley leehambley

View GitHub Profile

Keybase proof

I hereby claim:

  • I am leehambley on github.
  • I am leehambley (https://keybase.io/leehambley) on keybase.
  • I have a public key whose fingerprint is B127 09B1 8127 528B 2DA8 B1BF 6D2B C5D3 A68A BB05

To claim this, I am signing this object:

@leehambley
leehambley / memory.rb
Last active November 30, 2016 19:04 — forked from kylewelsby/memory.rb
require 'byebug'
require 'active_support/inflector'
module Sequares
module Store
class Memory < Base
class << self
def cache_key_for(klass, id)
inst = klass.with_history(id, [])
"#{inst.uri}|#{histories}"
end
@leehambley
leehambley / foo.rb
Last active November 16, 2016 08:38 — forked from anonymous/foo.rb
class Foo
attr_accessor :age
def initialize(age)
self.age = age if age < 100
end
end
a = Foo.new(10) # b.age defined
b = Foo.new(200) # no b.age defined

Types

A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.

Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer. In that case, the programmer isn't allowed to say x = true; that would be an invalid program. The compiler will refuse to compile it, so we can't even run it.

@leehambley
leehambley / company-ownership.md
Created July 5, 2016 19:22 — forked from jdmaturen/company-ownership.md
Who pays when startup employees keep their equity?

Who pays when startup employees keep their equity?

JD Maturen, 2016/07/05, San Francisco, CA

As has been much discussed, stock options as used today are not a practical or reliable way of compensating employees of fast growing startups. With an often high strike price, a large tax burden on execution due to AMT, and a 90 day execution window after leaving the company many share options are left unexecuted.

There have been a variety of proposed modifications to how equity is distributed to address these issues for individual employees. However, there hasn't been much discussion of how these modifications will change overall ownership dynamics of startups. In this post we'll dive into the situation as it stands today where there is very near 100% equity loss when employees leave companies pre-exit and then we'll look at what would happen if there were instead a 0% loss rate.

What we'll see is that employees gain nearly 3-fold, while both founders and investors – particularly early investors – get dilute

casper.test.begin('Test App Login Works Successfully', 1, function(test) {
var goalUrl = /wizard\/create/;
var formSelector = "form[name='harrowForm.form']";
casper.start('https://harrow.io/', function openTheHomePage() {
casper.evaluate(function() {
var res = localStorage.clear();
this.echo("Clearing Local Storage", res);
root@harrow:~# cat /opt/harrow/participating.rb
#!/usr/bin/env ruby
require 'json'
require 'cgi'

CGI.new.out("status" => "OK", "type" => "application/json", "connection" => "close") do
        sprintf "%s\n" % JSON.dump({participating: rand(10) == 1 })
end
==> default: vagrant-r10k: Beginning r10k deploy of puppet modules into /Users/leehambley/Projects/harrow/src/bitbucket.org/harrowio/api/puppet/environments/development/vendor using /Users/leehambley/Projects/harrow/src/bitbucket.org/harrowio/api/puppet/environments/development/Puppetfile
INFO -> Loading modules from Puppetfile into queue
INFO -> Deploying selinux into /Users/leehambley/Projects/harrow/src/bitbucket.org/harrowio/api/puppet/environments/development/vendor
INFO -> Deploying java_ks into /Users/leehambley/Projects/harrow/src/bitbucket.org/harrowio/api/puppet/environments/development/vendor
INFO -> Deploying rpmkey into /Users/leehambley/Projects/harrow/src/bitbucket.org/harrowio/api/puppet/environments/development/vendor
INFO -> Deploying postgres into /Users/leehambley/Projects/harrow/src/bitbucket.org/harrowio/api/puppet/environments/development/vendor
INFO -> Deploying epel into /Users/leehambley/Projects/harrow/src/bitbucket.org/harrowio/api/puppet/environments/develo
9920 1455582676.779968 execve("/bin/make", ["make"], ["HOSTNAME=vm.harrow.io", "TERM=xterm-256color", "HISTSIZE=1000", "LC_ALL=en_GB.UTF-8", "LS_COLORS=rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10"..., "MAIL=/var/spool/mail/vagrant", "LANG=en_GB.UTF-8", "LC_CTYPE=UTF-8", "SHELL=/bin/bash", "PATH=/sbin:/bin:/usr/sbin:/usr/bin", "LOGNAME=root", "USER=root", "USERNAME=root", "HOME=/root", "SUDO_COMMAND=/bin/strace -u root -e trace=clone,execve -ttt -T -v -f -s 256 -o strace.log make", "SUDO_USER=vagrant", "SUDO_UID=1000", "SUDO_GID=1000"]) = 0 <0.000338>
@leehambley
leehambley / avahi.go
Created November 9, 2015 12:26 — forked from lemenkov/avahi.go
How to register service with Avahi using golang and dbus
package main
import (
"github.com/guelfey/go.dbus"
"log"
"bufio"
"os"
)
func main() {