Skip to content

Instantly share code, notes, and snippets.

@stackmutt
stackmutt / rethinkdb-caches.md
Created April 7, 2016 01:04 — forked from threepointone/rethinkdb-caches.md
better caches with rethinkdb

better caches with rethinkdb

TL;DR - smelly software engineer discusses using rethinkdb changefeeds for building caches, breaks hearts, shaves the cheerleader, shaves the world.

Let's talk about caches.

Imagine that you build UIs for an ecommerce company, possibly in a fancy office with free coffee and whatnot. You've just been asked to build a way for the marketing / sales folks to change landing pages whenever they're running campaigns. After a number of angry discussions involving the ux team about what they can and cannot change, you settle on a 'document' format for these pages. It could be json describing a tree of widgets of banners and carousels, or html, or yaml, or whatever. Maybe you also invent a dsl that marks out parts of the document as dynamic, based on request parameters or something. I dunno, I'm not your boss. You build a little ui over the weekend (with react? maybe!) that lets these folks login, drag and drop their banners, maybe upload an image or two, and save to database.

Yo

@stackmutt
stackmutt / iTerm2Build.sh
Last active December 17, 2015 14:20
Custom iTerm2 Build Script
#!/bin/bash
# Original idea from here: http://superuser.com/questions/810582/iterm-osx-terminal-change-text-margin-from-edge-of-window
# Download, unzip, clean up.
wget --quiet https://github.com/gnachman/iTerm2/archive/master.zip
unzip master.zip
rm master.zip
# Go into project directory.
@stackmutt
stackmutt / cloud-config.yml
Last active December 30, 2015 02:27 — forked from socketwiz/cloud-config.yml
CoreOS cloud-config with iptables
#cloud-config
coreos:
etcd2:
# generate a new token for each unique cluster from https://discovery.etcd.io/new?size=3
# specify the initial size of your cluster with ?size=X
discovery: https://discovery.etcd.io/<token>
# multi-region and multi-cloud deployments need to use $public_ipv4
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
@stackmutt
stackmutt / iTerm2-Change-cursor-blink-speed.sh
Last active August 13, 2019 07:37 — forked from maxgrinev/gist:f02fd7fd6425a8b74dcf
iTerm2: Change cursor blinking speed (quit iTerm, run in Terminal.app, restart iTerm) (requires Nightly build)

Keybase proof

I hereby claim:

  • I am stackmutt on github.
  • I am stackmutt (https://keybase.io/stackmutt) on keybase.
  • I have a public key whose fingerprint is B084 D002 499E 6DBC 788A D4DB E458 C609 4124 01B9

To claim this, I am signing this object: