Skip to content

Instantly share code, notes, and snippets.


Scott Jacobsen scottjacobsen

View GitHub Profile
# See
# And
export CI_NAME="heroku"
export GIT_COMMITTED_AT="$(date +%s)"
# Run the ruby test suite
bundle exec rake
BretFisher / present.zsh-theme
Last active Nov 23, 2022
oh-my-zsh theme for presentations (hides prompt features based on path)
View present.zsh-theme
# problem: when presenting, I want to obscure
# my prompt to act like it's at root of file system
# and be very basic with no git info, etc.
# solution: this theme lets you set a ENV to the path
# of your presentation, which will help remove unneeded prompt
# features while in that path
# oh-my-zsh theme for presenting demos
# based off the default rubbyrussell theme
justjanne / Price
Last active Nov 29, 2022 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/
View Price

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/



Provider Type RAM Cores Storage Transfer Network Price
michaelfeathers / gist:1e2934ebb95560cddc3b
Created Apr 3, 2015
return a string that represents increases, decreases, and stable changes in a method's length
View gist:1e2934ebb95560cddc3b
# :: [event] -> String -> String
def method_delta_line es, method_name {|e| e.method_name == method_name }
.map {|c,n| ["^","v","-"][(c <=> n) + 1] }
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
matthewmueller /
Last active Oct 19, 2022
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
# Source:
# Some things taken from here
# Ask for the administrator password upfront
john2x /
Last active Nov 25, 2022
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

tompave / nginx.conf
Last active Aug 15, 2022
commented nginx.conf for Ruby on Rails
View nginx.conf
# A commented nginx configuration file for Ruby on Rails
# Author: Tommaso Pavese
# License:
# Tested with:
rgreenjr / postgres_queries_and_commands.sql
Last active Dec 2, 2022
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
denmarkin / resque.rake
Created Sep 20, 2011
My rake task for clearing Resque queues and stats
View resque.rake
# see - old version
# see
# see - new commands
namespace :resque do
desc "Clear pending tasks"
task :clear => :environment do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."