Skip to content

Instantly share code, notes, and snippets.

View brandongalbraith's full-sized avatar

B brandongalbraith

  • North America
View GitHub Profile
@brandongalbraith
brandongalbraith / examples.txt
Created July 6, 2016 15:47 — forked from brickZA/examples.txt
Tests for quoting with fabric.contrib.files.append. original.txt is generated using 6c483ef261ab8ed243b39a337b0382a8c84e5994, patched version using 6d91ffff8cb1c9ed468475a6ca4d167751f4dff0
test (one)
test '(' \ ) two
test "'three)' '' the
test \'a\'$ four
test ""'""'' five
^six $(('")"((thing)it's)'\'')'' test$
_test%(seven')')
@brandongalbraith
brandongalbraith / company-ownership.md
Created July 6, 2016 02:56 — 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

@brandongalbraith
brandongalbraith / GitHub curl.sh
Created May 17, 2016 20:05 — forked from Integralist/GitHub curl.sh
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@brandongalbraith
brandongalbraith / shell.py
Created May 17, 2016 17:29 — forked from jamescarr/shell.py
Test jinja2 out in a console quickly. If you have jinja2 installed locally just open a python REPL and do this!
from jinja2 import Template
text = """
hi {{ name|default(other_name) }}
"""
template = Template(text)
template.render(name="foo") # passing variables here to the text template if needed
template.render(other_name"bar")
@brandongalbraith
brandongalbraith / Dockerfile
Created May 13, 2016 15:18 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@brandongalbraith
brandongalbraith / install_ffmpeg_ubuntu.sh
Created April 2, 2016 19:47 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@brandongalbraith
brandongalbraith / torrc
Created April 1, 2016 18:32 — forked from pdp7/torrc
DigitalOcean non-exit relay /etc/tor/torrc
ORPort 443
Exitpolicy reject *:*
Nickname EFFisMyHero
ContactInfo <pdp7pdp7 AT gmail dot com> GPG: 0x84D44A9317F1138E
Log notice file /var/log/tor/notices.log
RelayBandwidthRate 1024 KB
RelayBandwidthBurst 1024 KB
MaxAdvertisedBandwidth 1024 KB
DisableDebuggerAttachment 0
@brandongalbraith
brandongalbraith / install-tor.txt
Created April 1, 2016 16:17 — forked from pdp7/install-tor.txt
install tor non-exit relay on digital ocean
# My steps for creating a DigitalOcean server to run non-exit Tor node for just $5/mo
# Screen shots of my setup process: https://plus.google.com/photos/+DrewFustini/albums/6057260188204970945
# Create Digital Ocean account: https://www.digitalocean.com/
# Create Droplet on Digital Ocean: select $5/mo, and select Debian 7.0 64-bit
# This instructions are based on Tor Project: https://www.torproject.org/docs/tor-relay-debian.html.en
afustini@lappy486:~$ ssh [email protected]
[email protected]'s password:
You are required to change your password immediately (root enforced)
Linux Tor300SoF 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64
@brandongalbraith
brandongalbraith / comprehensions.md
Created March 28, 2016 05:37 — forked from bearfrieze/comprehensions.md
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

All of the tasks presented in the examples can be accomplished with the extensive standard library available in Python. These solutions would arguably be more terse and efficient in some cases. I don't have anything against the standard library. To me there is a certain

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should