Skip to content

Instantly share code, notes, and snippets.

@isaacsanders
isaacsanders / Equity.md
Created January 21, 2012 15:32
Joel Spolsky on Equity for Startups

This is a post by Joel Spolsky. The original post is linked at the bottom.

This is such a common question here and elsewhere that I will attempt to write the world's most canonical answer to this question. Hopefully in the future when someone on answers.onstartups asks how to split up the ownership of their new company, you can simply point to this answer.

The most important principle: Fairness, and the perception of fairness, is much more valuable than owning a large stake. Almost everything that can go wrong in a startup will go wrong, and one of the biggest things that can go wrong is huge, angry, shouting matches between the founders as to who worked harder, who owns more, whose idea was it anyway, etc. That is why I would always rather split a new company 50-50 with a friend than insist on owning 60% because "it was my idea," or because "I was more experienced" or anything else. Why? Because if I split the company 60-40, the company is going to fail when we argue ourselves to death. And if you ju

@jc00ke
jc00ke / capybara-helpers.rb
Created January 28, 2012 07:47
Capybara helpers
def screenshot
require 'capybara/util/save_and_open_page'
now = Time.now
p = "/#{now.strftime('%Y-%m-%d-%H-%M-%S')}-#{rand}"
Capybara.save_page body, "#{p}.html"
path = Rails.root.join("#{Capybara.save_and_open_page_path}" "#{p}.png").to_s
page.driver.render path
Launchy.open path
end
@ser1zw
ser1zw / _tmuxinator
Created March 29, 2012 19:43
zsh completion for tmuxinator
#compdef tmuxinator mux
# zsh completion for tmuxinator
# Install:
# $ mkdir -p ~/.tmuxinator/completion
# $ cp _tmuxinator ~/.tmuxinator/completion
# $ vi ~/.zshrc # add the following codes
# fpath=($HOME/.tmuxinator/completion ${fpath})
# autoload -U compinit
@jc00ke
jc00ke / example_spec.rb
Created May 10, 2012 21:38 — forked from henrik/example_spec.rb
Testing Draper decorators with real helpers, including URL helpers.
require "spec_helper"
# :draper_with_helpers is necessary for the Draper objects
# to access real helpers, including URL helpers, in the spec.
describe MyDecorator, "#foo", :draper_with_helpers do
# This is necessary for the spec itself to use URL helpers
# like some_path().
include Rails.application.routes.url_helpers
@beanieboi
beanieboi / gist:2702092
Created May 15, 2012 14:15
Upgrade to Postgres 9.2 beta 1 on Ubuntu 12.04
# Install Postgres 9.2 from https://launchpad.net/~pitti/+archive/postgresql
# drop the cluster which gets created during the setup
pg_dropcluster --stop 9.2 main
# create a backup of your current cluster
rsync -a /var/lib/postgresql/9.1 /var/lib/postgresql/9.1.backup
# upgrade the the old 9.1 cluster
pg_upgradecluster 9.1 main /var/lib/postgresql/9.2
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 16, 2024 20:53
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@luque
luque / Variation of Greenpun's Tenth Rule
Created July 31, 2012 19:19
Variation of Greenpun's Tenth Rule
Any modern, innovative and worth learning framework or programming
language implements a subset of Smalltalk's features but lacks its
vision and design principles.
@postmodern
postmodern / Makefile
Last active March 4, 2024 14:42
A generic Makefile for building/signing/install bash scripts
NAME=project
VERSION=0.0.1
DIRS=etc lib bin sbin share
INSTALL_DIRS=`find $(DIRS) -type d 2>/dev/null`
INSTALL_FILES=`find $(DIRS) -type f 2>/dev/null`
DOC_FILES=*.md *.txt
PKG_DIR=pkg
PKG_NAME=$(NAME)-$(VERSION)
@judofyr
judofyr / fizzbuzz.rb
Created August 1, 2012 21:37 — forked from JEG2/fizzbuzz.rb
Writing FizzBuzz with flip-flops
a=b=c=(1..100).each do |num|
print num, ?\r,
("Fizz" unless (a = !a) .. (a = !a)),
("Buzz" unless (b = !b) ... !((c = !c) .. (c = !c))),
?\n
end
@jc00ke
jc00ke / check.c
Created August 30, 2012 22:34
first C program!
#include <stdio.h>
#include "sqlite3.h"
int main(int argc, char *argv[]){
int res = sqlite3_threadsafe();
printf("it returned %d\n", res);
return 0;
}