Skip to content

Instantly share code, notes, and snippets.

View cr0t's full-sized avatar
🏠
Working from home

Sergey ⚗️ Kuznetsov cr0t

🏠
Working from home
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

@cr0t
cr0t / generate-swarm.sh
Created November 6, 2016 20:12 — forked from derwiki/generate-swarm.sh
Series of commands (not an executable script per se) to get you from a git repository to a Code Swarm AVI (tested on Linux and OS X).
CODESWARM_DIR="/home/user/src/code_swarm/"
# extract from your git repo
git log --name-status --pretty=format:'%n------------------------------------------------------------------------%nr%h | %ae | %ai (%aD) | x lines%nChanged paths:' > $CODESWARM_DIR/data/activity.log
# convert to XML for CodeSwarm
python convert_logs/convert_logs.py \
-g $CODESWARM_DIR/data/activity.log -o $CODESWARM_DIR/data/activity.xml
# create a new config that points to the correct input XML and saves snapshots
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
.DS_Store
# Ignore bundler config.
/.bundle
@cr0t
cr0t / gist:1826746
Created February 14, 2012 13:26
unicorn init script
#!/bin/sh
# we assume that we use system wide rvm installation (in /usr/local/rvm)
# and our application is deployed to /var/www/tld.appname directory
RVM_ENV="ruby-1.9.3-p0@gemset"
APP_DIR="tld.appname"
# load rvm
source /usr/local/rvm/environments/$RVM_ENV
@cr0t
cr0t / gist:1826732
Created February 14, 2012 13:24
unicorn.rb config file
APP_PATH = "/var/www/tld.appname"
rails_env = ENV["RAILS_ENV"] || "development"
# 2 workers and 1 master
worker_processes 2
working_directory APP_PATH + "/current" # available in 0.94.0+
# Load rails+github.git into the master before forking workers
@cr0t
cr0t / osx_lion_rail_setup.md
Created December 23, 2011 16:39 — forked from jpantuso/osx_lion_rail_setup.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@cr0t
cr0t / gist:1243431
Created September 26, 2011 21:20
Play! framework: How do get files from Hadoop and send them via HTTP
object Download extends Controller {
import org.apache.commons.logging.Log
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs._
import java.io.InputStream
import java.net.URI
import java.net.URLDecoder
def download(filename: String) = {
@cr0t
cr0t / App.scala
Created August 31, 2011 15:02 — forked from teamon/App.scala
import Benchmark._
object App {
def main(args: Array[String]): Unit = {
benchmark(100000){
report("foo"){ foo() } ::
report("bar"){ bar() } ::
Nil
}
}