Skip to content

Instantly share code, notes, and snippets.

burke /
Created Jan 27, 2012 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.


You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

View spooler.go
// package spooler implements a disk-persistent queue.
// Spooler uses MDB (LMDB) to implement a queue of byteslices. Its intended usecase
// is to enqueue work items received by a service before later working them off.
// Note that Spooler only flushes to disk up to once every 25ms. As a result,
// if the process or machine crashes unexpectedly, the most recent 25ms of work
// can be lost. This decision effectively increases throughput by 10,000%,
// but makes spooler unsuitable for jobs that absolutely cannot be allowed to fail
// under any circumstances.
package spooler
burke / genkey.rb
Created Oct 12, 2016
Create an Elliptic Curve keypair in ruby
View genkey.rb
require 'openssl'
k ='secp384r1').generate_key
p =
p.public_key = k.public_key
puts k.to_pem, p.to_pem
View nix_store_safeguard.rb
# typed: false
# frozen_string_literal: true
# Note: This is loaded *ludicrously* early in the boot process: please don't
# introduce other dependencies here.
# ===
# Okay so here's the deal. When we compile a bundle of ruby code via
# `bundlerEnv`, we install all the gems individually into a bunch of separate
View 0.txt
Save this in [[roam/css]] as a toplevel block, wrapped in "```css" and "```"
burke /
Last active Sep 10, 2020
This sets up keybindings in tmux that allow you to copy/paste to/from your OS X clipboard from tmux running inside an SSH connection to a remote host. Partially borrowed from

Local (OS X) Side


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View apfs_volume.rb
# typed: true
# frozen_string_literal: true
module Dev
module Helpers
class APFSVolume
View ru.nix
{ config, pkgs, lib, ... }:
{ = "shopify-pay";
rune.framework.rails.enable = true;
aspect.packages.include = with pkgs; [
geolite2 ngrok mysqlClient57 overmind watchman toxiproxy v8
rune.project.repoName = "pay";
burke /
Last active Jun 9, 2020
Code Release for NixCon 2019

The rest of these files are the code referenced in my NixCon 2019 talk which live in Shopify's non-public codebases. Everything in this gist is extracted with minimal or no change from our codebase, and thus some of it references libraries or other code not included here. cli-ui and cli-kit probably comprise a majority of these cases.

All code Copyright Shopify, 2019, released here under MIT License.

View gameoflife.rb
# -*-coding: utf-8-*-
module Enumerable def &b;each &b;end end