Skip to content

Instantly share code, notes, and snippets.

View isaacsanders's full-sized avatar

Isaac Sanders isaacsanders

View GitHub Profile
@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

$ cat ~/bin/git-update-from-origin
#!/usr/bin/env zsh
git pull origin "${$(git symbolic-ref HEAD)#refs/heads/}"
@isaacsanders
isaacsanders / gist:1106558
Created July 26, 2011 11:48
Tim's Methods
require 'rspec'
require 'date'
describe "Tim's Methods" do
it "should be clear that Tim needs to get his ass back here" do
do_we_want_tim_back = TimsRep.new.do_we_like_him?
do_we_want_tim_back.should == true
end
end
@isaacsanders
isaacsanders / under.rb
Created January 4, 2012 15:55
Ruby Under
class File
instance_eval do
:open.is_inverse_of(:close)
end
end
File.under(:open, *open_args) do |file|
# do stuff to the file
end

Promoting images with Docker & OpenShift

You need to have the oc command installed to interact with OpenShift from the command line. This can be installed from https://github.com/openshift/origin. Docker is also required. Search online for information on how to do that.

These are the commands to ensure your system state is such that you can perform an image promotion between staging and production.

@isaacsanders
isaacsanders / commands.md
Last active February 20, 2019 23:00
Basic Vim commands

Vim primer

Modes

  • Normal: the mode that you are generally in at the beginning of a session. One does most of their moving around in this mode.
  • Insert: the mode where you are inserting text.
  • Visual: the mode for selecting text.
  • Command: the mode where you use commands for reading/writing files and managing your session.

I imagine I am missing some, but these are the ones I use the most.

@isaacsanders
isaacsanders / agenda.md
Created January 2, 2013 02:43
An agenda for a recent meeting.

#Council of Chiefs

9:00PM November 3, 2012

Camp Lazarus
4422 Columbus Pike
Delaware, OH 43015

Goal of the Meeting: To make decisions regarding the specifics of Conclave 2013

@isaacsanders
isaacsanders / output.log
Created October 24, 2017 15:10
Hex/Mix Errors
** (Mix) httpc request failed with: :socket_closed_remotely
Could not install Hex because Mix could not download metadata at https://repo.hex.pm/installs/hex-1.x.csv.signed.
10:05:53.111 [error] Failed updating session:
ProfileName: :httpc_mix
SessionId: {{'repo.hex.pm', 443}, #PID<0.111.0>}
Pos: 7
Value: 0
def function(a)
a.group_by.inject({}) do |hash, (key,val)|
hash[key] = val.count if val.count > 1
hash
end
end

Thread 1: main (WAITING)

sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
akka.actor.ActorSystemImpl$TerminationCallbacks.ready(ActorSystem.scala:817)
akka.actor.ActorSystemImpl$TerminationCallbacks.ready(ActorSystem.scala:786)