Skip to content

Instantly share code, notes, and snippets.


Pressure cooker Pho Ga (vietnamese chicken soup)

OK. First of all, this does not aim to be authentic in any sense of the word or be simple or be perfect. It is a reasonable approximation of a favorite chicken soup/flavor profile produced with what I see as the right level of tradeoffs between time saving and being finicky. The most memorable Pho Ga I've had was at Turtle Tower in SF. This is chasing that flavor memory but also maybe some of my own chicken soup preferences.

Tools required:

  • Pressure Cooker (stovetop or electric)
  • Fine mesh sieve or chinois
  • Cast iron pan
View rbtrace.rb
# pid = pid of running ruby process
tracer =
output = tracer.eval("StackProf.start")
puts output #=> "<StackProf ....>"
quirkey / json_log_stats.rb
Last active Aug 29, 2015
JSON log stats
View json_log_stats.rb
#!/usr/bin/env ruby
require 'json'
require 'descriptive_statistics'
def print_data_summary(key_name, data)
puts "-----------------------------------------------------------"
puts "-- #{key_name} --"
puts "Data Points:\t\t#{data.length}"
puts "Mean:\t\t#{data.mean}"
puts "Median:\t\t#{data.median}"
quirkey / console_helpers.rb
Last active Feb 13, 2020
All the code for the Paperless Profiler
View console_helpers.rb
require 'rblineprof'
module Rblineprof
module ConsoleHelpers
include Rblineprof::Helpers
def lineprof_block(options = {}, &block)
profile = lineprof(rblineprof_profiler_regex(options[:lineprofiler])) do
ret = yield
View throttle
# Bandwidth throttling for OSX,
case "$1" in
echo Throttling at $KB Kbytes/s
sudo ipfw pipe 1 config bw "$KB"KByte/s
View throttle
# Bandwidth throttling for OSX,
case "$1" in
echo Throttling at $KB Kbytes/s
sudo ipfw pipe 1 config bw "$KB"KByte/s
quirkey /
Created Jun 8, 2013
The current state of the Paperless Post Dev Teams Creeds

The Paperless Post Developer Creeds

For as long as we've been a team, we've tried hard to work with a set of guiding principles. These are not hard and fast rules, but rather a set of informal maxims that help us to make decisions, prioritize our work, and generally ship a ton of quality code. We're here to work hard, have fun, and make our customers happy, and we feel that these principles can help us make that happen.

Fixing > Complaining

We work in an ever changing system. Yesterday's awesome work is today's legacy code. Complaining that a piece of code or system doesn't work or isn't correct will not fix it. We are all responsible for this "bad" code which means we're also responsible for making it better.

Helping > Winning

View simple_redis_profile.rb
#!/usr/bin/env ruby
# Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern:
# keys: number of keys matching the given pattern
# size: approximation of the associated memory occupied (based on size/length of value)
# percent: the proportion of this 'size' relative to the sample's total
# Copyright Weplay, Inc. 2010. Available for use under the MIT license.
View whitespace.rb
#!/usr/bin/env ruby
# script/whitespace
# Strips whitespace from any files modified in git
# Also:
# - converts tabs to spaces
# - ensures a single newline at the end
class WhitespaceProcessor
def self.process(code)
View gist:3466735
½ cup light brown sugar
¼ cup sweet paprika
1 tbsp. chili powder
1 tbsp. onion powder
1 tbsp. garlic powder
1 tbsp. cayenne
apple cider (farmer's market)
3 lemons
Shichimi togarashi
crème fraîche