Skip to content

Instantly share code, notes, and snippets.

View adamnemecek's full-sized avatar

adamnemecek

View GitHub Profile
@jdmaturen
jdmaturen / company-ownership.md
Last active July 29, 2023 22:39
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

#This script is fairly hacky, but it allows you to create a working bundle.
#You should run the regular deploy.sh script that uses macdeployqt before using this one.
#Use it to convert occurences of @rpath and @loader_path to the final @executable_path.
#It might be best if there's some way to make macdeployqt or cmake add the correct paths.
#Essentially, you need to check the dependencies in Frameworks .dylibs, Qt libraries that are included
#and all the .so plugins in PlugIns/krita.
#Please note that if you are using MacDependency to view the .so plugins, they will always appear red,
#even if they are correctly linked. Use export QT_DEBUG_PLUGINS=1 while running krita if you suspect one of these plugins or any other
/// An operator is given by a list of arities, where each element indicates the number of
/// variables bound by the operator at that position and the length of the list determines the
/// number of variables the operator accepts. The full generalization of arity is called
/// the operator's "valence".
///
/// For example, if I have a little calculator language with let-bindings, its operators
/// would look like this:
///
///
/// enum CalcOps : Operator {
@zabirauf
zabirauf / expng.ex
Created July 23, 2015 08:32
PNG format Parser in Elixir
defmodule Expng do
defstruct [:width, :height, :bit_depth, :color_type, :compression, :filter, :interlace, :chunks]
def png_parse(<<
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A,
_length :: size(32),
"IHDR",
width :: size(32),
height :: size(32),
@patshaughnessy
patshaughnessy / gist:70519495343412504686
Last active April 13, 2025 16:58
How to Debug Postgres using LLDB on a Mac
This note explains how to build Postgres from source and setup to debug it using LLDB on a Mac. I used this technique to research this article:
http://patshaughnessy.net/2014/10/13/following-a-select-statement-through-postgres-internals
1. Shut down existing postgres if necessary - you don’t want to mess up your existing DB or work :)
$ ps aux | grep postgres
pat 456 0.0 0.0 2503812 828 ?? Ss Sun10AM 0:11.59 postgres: stats collector process
pat 455 0.0 0.0 2649692 2536 ?? Ss Sun10AM 0:05.00 postgres: autovacuum launcher process
pat 454 0.0 0.0 2640476 304 ?? Ss Sun10AM 0:00.74 postgres: wal writer process
pat 453 0.0 0.0 2640476 336 ?? Ss Sun10AM 0:00.76 postgres: writer process
@LearnCocos2D
LearnCocos2D / gist:77f0ced228292676689f
Last active April 16, 2025 02:41
Overview of Entity Component System (ECS) variations with pseudo-code

For background and further references see: Entity Component Systems on Wikipedia

ECS by Scott Bilas (GDC 2002)

Entity->Components->Update
  • entity = class: no logic + no data OR at most small set of frequently used data (ie position)
  • component = class: logic + data
foreach entity in allEntities do
    foreach component in entity.components do
@beccadax
beccadax / BitSet.swift
Last active May 13, 2016 02:57
Minimal BitSet type capable of handling integer-based RawRepresentable enums. Does not implement all of Set's functionality, but the skeleton is here.
// This is basically a polymorphic constant.
// We don't base it on sizeof(IntMax) because that returns Int, which we may not be able to convert to the correct IntegerType.
private func intMaxBitSize<T: IntegerType>() -> T {
return 63
}
public struct BitSet<T: RawRepresentable where T.RawValue: IntegerType>: RawRepresentable {
private(set) public var rawValue: IntMax = 0
public init() {}
class ArrayImpl<T> {
var space: Int
var count: Int
var ptr: UnsafeMutablePointer<T>
init(count: Int = 0, ptr: UnsafeMutablePointer<T> = nil) {
self.count = count
self.space = count
@AjayRamanathan
AjayRamanathan / GoG-Proposal.md
Last active February 16, 2017 15:48
Grammar of Graphics Gsoc Proposal

#Layered Grammar of Graphics

  • Ajay Ramanathan
  • [Diagrams][309]
  • Mentor: [Chris][223]

###Short description:

The project aim is to implement layered [Grammar of Graphics][303], in [Haskell][308] using [Diagrams][309] as backend. The core ideas is to start with the raw data and think about all the transformations, statistics, etc. that go into graphing it. With a good framework, this can help us see connections between different graphs and create new ones. You’ll realize that a pie chart is basically just a stacked bar chart plotted in polar coordinates, with bar height mapped to pie-slice angle… and that can get you thinking.

@skeeto
skeeto / jit.c
Last active August 18, 2024 16:51
Basic JIT
/* http://redd.it/2z68di */
#define _BSD_SOURCE // MAP_ANONYMOUS
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#define PAGE_SIZE 4096