Skip to content

Instantly share code, notes, and snippets.

View mtwentyman's full-sized avatar

Michael Twentyman mtwentyman

  • Endeavor Digital
  • Atlanta, GA
View GitHub Profile

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@mtwentyman
mtwentyman / _capistrano_custom
Created September 13, 2016 15:09
capp, an ohmyzsh plugin for capistrano
#compdef capp
#autoload
# Added `capp` because `cap` is a reserved word. `cap` completion doesn't work.
# https://stackoverflow.com/questions/21353937/is-cap-a-reserved-word-zsh-completion?noredirect=1#comment32196838_21353937
# http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module
# https://github.com/capistrano/capistrano/wiki/Capistrano-Tasks
# http://askql.wordpress.com/2011/01/11/zsh-writing-own-completion/
class Blackbox < Formula
homepage 'https://github.com/StackExchange/blackbox'
url 'https://github.com/StackExchange/blackbox/archive/v1.20150730.tar.gz'
sha256 'e410e3e7562a4291600d54057168125a59fdb5ef6af00334e2c2a6960759605b'
def install
rm 'bin/Makefile'
bin.install Dir['bin/*']
end
@mtwentyman
mtwentyman / gist:25261e2e8a3ac36deab0
Created June 2, 2014 14:28
active model/support 4.1 upgrade errors for Her
Her::Model::Associations .....................................FFFFFF....
1) Her::Model::Associations object returned by the association method doesnt mask the object's basic methods
Failure/Error: Foo::User.new.tap { |user| user.role = associated_value }
NoMethodError:
undefined method `empty?' for nil:NilClass
# ./lib/her/model/associations/association.rb:47:in `fetch'
# ./lib/her/model/associations/association_proxy.rb:18:in `is_a?'
# ./lib/her/model/associations/association_proxy.rb:47:in `method_missing'
# ./lib/her/model/attributes.rb:192:in `role='
# ./lib/her/model/attributes.rb:78:in `method_missing'
@mtwentyman
mtwentyman / gist:6140194
Created August 2, 2013 14:13
how to open gems in sublime text editor
# ~/.bash_aliases
gempaths ()
{
gemdir=`gem environment gemdir`/gems;
paths='';
for i in "$@";
do
paths="$paths `echo $gemdir/$i`";
done;
echo -e $paths
@mtwentyman
mtwentyman / gist:5502091
Last active December 16, 2015 21:49
OS X terminal git branch color PS1 fix CTRL-R oddities
case ${TERM}
in xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix)
PROMPT_COMMAND='update_terminal_cwd;GIT_BRANCH=`test -d .git \
&& git status --porcelain -b 2> /dev/null \
| grep --color=never -e ''\#\# '' \
| sed "s/^\#\#.\(.*\)/\ \(\1\)/" \
| tr -d "\n"`'
use_color=true
# unset PROMPT_COMMAND
;;
@mtwentyman
mtwentyman / AuthorizeNetCim.class.php
Created April 1, 2011 20:00
Library to handle transactions with authorize.net
<?php
class AuthorizeNetCimException extends Exception {}
class AuthorizeNetCim {
const PAYMENT_METHOD_CC = 'credit_card';
const PAYMENT_METHOD_BANK = 'bank_account';
const PAYMENT_METHOD_CHECK = 'check';
const TEST_VALIDATION_MODE = 'testMode';