Skip to content

Instantly share code, notes, and snippets.

View btipling's full-sized avatar
:shipit:
shipping code

btipling

:shipit:
shipping code
  • ConductorOne
  • Bay Area, California
  • 19:48 (UTC -12:00)
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

indexes: [
{
using: 'GIN',
fields: ['field']
}
]
// CREATE INDEX field ON $modelTable USING gin (field);
indexes: [
#!/usr/bin/env sh
SPATH="$(cd $(dirname "$0") && pwd -P)"
SECRET_NAME=${1:-docker-registry-secret}
CONFIG_PATH=${2:-$SPATH/localkube.json}
if [[ ! -f $CONFIG_PATH ]]; then
echo "Unable to locate service account config JSON: $CONFIG_PATH";
exit 1;
fi
@btipling
btipling / libPNGOpenGL.cpp
Created May 3, 2016 04:19 — forked from mortennobel/ libPNGOpenGL.cpp
Updated to libpng 1.5.15
#ifdef _WIN32
#include <GL/glut.h>
#else
#include <GLUT/glut.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <png.h>
#include <iostream>
@btipling
btipling / graphics.cpp
Created April 6, 2016 06:06 — forked from xaxxon/graphics.cpp
gl error checker
void Graphics::check_error(const char * filename, int line_number) {
GLenum error;
while ((error = glGetError()) != 0) {
printf("GL Error %x: %s:%d\n", error, filename, line_number);
exit(1);
}
}
@btipling
btipling / graphics.cpp
Created April 6, 2016 06:06 — forked from xaxxon/graphics.cpp
shader builder
GLuint Graphics::build_shader_program(const char * vertex_shader_source, const char * fragment_shader_source) {
// printf("Compiling shaders %s and %s\n", vertex_shader_source, fragment_shader_source);
/* create program object and attach shaders */
GLuint program = glCreateProgram();
shaderAttach(program, GL_VERTEX_SHADER, vertex_shader_source);
check_error(__FILE__, __LINE__);
shaderAttach(program, GL_FRAGMENT_SHADER, fragment_shader_source);
check_error(__FILE__, __LINE__);
@btipling
btipling / connect.rs
Created December 27, 2015 23:57 — forked from mathieulegrand/connect.rs
simple connect to server:443 in Rust
// Rust 0.10-pre (Tue Mar 18, 2014)
// $ rustc -L rust-openssl/build/ -L rust-toml/lib doing.rs
// assuming https://github.com/sfackler/rust-openssl is cloned and compiled,
// and https://github.com/mneumann/rust-tom is cloned and compiled
#[feature(macro_rules)];
#[allow(deprecated_owned_vector)];
extern crate openssl;
extern crate serialize;
@btipling
btipling / snake.py
Last active November 22, 2015 04:54 — forked from tarruda/snake.py
# Snake for Neovim! Adapted from https://gist.github.com/sanchitgangwar/2158084
# To install, create a ~/.vim/external-plugin/python/snake.py file with this
# code, then run `nvim -c 'UpdateExternalPlugins' -c 'q'` from a shell.
#
# Make sure you have read the internal help explaining how to setup python
# host for external plugins(:help nvim-python)
#
# To start a new game, use the `:SnakeStart` command on an empty buffer(uses 80
# columns and 20 rows)
from threading import Thread, Lock
@btipling
btipling / introrx.md
Last active August 29, 2015 14:08 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a