Skip to content

Instantly share code, notes, and snippets.


Jeremy Seitz somebox

View GitHub Profile
somebox /
Last active Jun 26, 2021 — forked from foz/
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
somebox /
Last active Apr 12, 2021
Interviewing Engineers

Note: This is an opinionated guide. While it is most effective for on-site, the same pattern can work with remote candidates.

How To Interview Engineers

Interviewing is hard. It's not easy to find good people, and once you do, it's often difficult to find out what they can do and how they work. A badly-run interview can pass over a great engineer. Conversely, some engineers are good at passing traditional tech interviews, but bring major problems with work habits or team fit.

The first priority of any manager is to hire the best people. Everything else must wait.


somebox /
Last active Mar 25, 2021
Domain-Driven Desire: Further Reading

Domain-Driven Desire: The Talk from Øredev 2016


Links and References

Thanks for watching my talk, Domain-Driven Desire at Øredev 2016. Here's a list of resources that inspired me, and will hopefully inspire you:


somebox /
Last active Jan 28, 2021
Thoughts About Rails Presenters

Thoughts about Rails Presenters

This is a collection of links, examples and rants about Presenters/Decorators in Rails.

The "Decorator" pattern slowly started gaining popularity in Rails several years ago. It is not part of core Rails, and there's many different interpretations about how it should work in practice.

Jay Fields wrote about it in 2007 (before he switched back to Java and then Clojure):


Why NOT to Cache

I’ve worked over the years on a lot of projects, with many teams. Frontend, backend, mobile, and so forth. One topic that always comes up - caching. Developers love to talk about the topic, and are excited to add seemingly low-cost performance enhancers to their architecture and code base. However, as Martin Fowler and many others have pointed out, caching is evil. It’s one of the hardest problems in computer science to solve.

The typical pattern is to take a slow request - say, an API response - and store it in a local cache (perhaps to disk, or Redis). The implementation goes like this: the simple approach is to do a get/set cache lookup. When the user needs the data, check if it’s in the cache. If it’s not, or it has expired, then fetch the latest value and store it in the cache.

For apps, one side effect of this approach is degraded experience for some small group of users. For example, a web app needs to access a slow resource that takes 2 seconds to respond. With caching used, tha

somebox / gh-like.css
Created Jul 14, 2011
github markdown css+script with syntax highlighting. Works with
View gh-like.css
Some simple Github-like styles, with syntax highlighting CSS via Pygments.
font-family: helvetica, arial, freesans, clean, sans-serif;
color: #333;
background-color: #fff;
border: none;
line-height: 1.5;
margin: 2em 3em;
somebox / convert_trac.rb
Created Oct 10, 2010
Convert Trac Wiki to Markdown
View convert_trac.rb
#!/usr/bin/env ruby
# Convert Trac DB Wiki pages to Markdown source files
# This script is based on which
# converted all pages from a Trac DB to GitHub Wiki format (as Textile).
# I made two changes:
# - uses MarkDown format instead
# - uses the sqllite3-ruby gem which does not need Ruby 1.9
View esp8266-large-seven-segment-shift-register.cpp
#include <Arduino.h>
#include "ESP8266WiFi.h"
#include "SPI.h"
#include <NTPClient.h>
#include <WiFiUdp.h>
A large four digit 7-segment LED clock, controlled by an ESP8266.
The LED modules are quite large, 5" tall, and require high voltage to drive the many
somebox / nginx.conf
Created Mar 13, 2012
Nginx error page handling
View nginx.conf
# The following recipe works with upstream rails proxy for custom 404s and 500s.
# Errors are usually handled via rails except if proxy is really down, in which case
# nginx needs a bit more configration.
server {
# ...
location / {
error_page 404 = @rails; # let rails show a page with suggestions
try_files maintenance.html @rails;
somebox /
Last active Mar 10, 2018
Learning Resources