Skip to content

Instantly share code, notes, and snippets.

@wmarshall484
wmarshall484 / sautee_chicken.py
Last active July 26, 2017 05:59
A recipe for sauteed chicken
from stores import Safeway
from ingredients import Meats, Oils, Vegetables, Spices
from kitchen import Pan, Stove, Plate
from life import Girlfriend, Me
import common_steps, units, time
class Recipe(object):
def __init__(self, name, description=None, cook_time=None):
self.name = name
self.description = description
@heybenchen
heybenchen / git_checkout_index.sh
Last active March 10, 2016 20:11
Git Checkout by Branch Index
function gc() {
git branch | sed -n $1p | xargs -n 1 git checkout
}
@vasanthk
vasanthk / System Design.md
Last active July 15, 2024 10:23
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@alanrubin
alanrubin / gulpfile.js
Last active August 29, 2015 14:16
Jest (gulp-jest) + React + React Router Testing files
/** .... **/
var $ = require("gulp-load-plugins")();
var gulp = require("gulp");
function handleError(task) {
return function(err) {
$.util.log($.util.colors.red(err));
$.notify.onError(task + " failed, check the logs..")(err);
};
@amejiarosario
amejiarosario / rails_migration_cheatsheet.md
Created June 18, 2012 21:40
Rails Migration - Cheatsheet