Skip to content

Instantly share code, notes, and snippets.


Marc Bollinger slpsys

View GitHub Profile
View redshift ddl and


CREATE TABLE views.web_visit_facts
  visit_id VARCHAR(96) ENCODE LZO,
  assignment_id VARCHAR(64) ENCODE LZO,
  ip_address VARCHAR(96) ENCODE LZO,
  country_code VARCHAR(2) ENCODE LZO,
  visit_timestamp BIGINT ENCODE DELTA32K,
View redshift_size_by_table.sql
cast(use2.usename as varchar(50)) as owner,
trim(pgdb.datname) as Database,
trim(pgn.nspname) as Schema,
trim( as Table,
(b.mbytes / 1024) gbytes,
((case when a.rows > 0 then b.mbytes / a.rows::real end) * 1024) kb_per_row,
round(b.mbytes / (sum(b.mbytes) over ())::real * 100, 4) pct_of_cluster
slpsys / bootstrap.sql
Last active Dec 18, 2017
Schema + sample data for regs / subs over time SQL question
View bootstrap.sql
# Drop the Coderpad default tables
drop table if exists alerts;
drop table if exists departments;
drop table if exists employees;
drop table if exists employees_projects;
drop table if exists projects;
drop table if exists sales;
drop table if exists signup_flow_events;
drop table if exists stores;
drop table if exists products;
acolyer /
Last active Sep 26, 2020
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
lost-theory /
Last active Mar 26, 2019
Monitorama 2014 notes

Monitorama 2014 notes

Best talks day 1:

  • Please, no More Minutes, Milliseconds, Monoliths... or Monitoring Tools! - Adrian Cockcroft
    • gave 5 good rules for monitoring systems, showed what cloud / microservices monitoring looks like @ Netflix
  • Simple math to get some signal out of your noisy sea of data - Toufic Boubez
    • explains why static alert thresholds don't work and gave 3 techniques to use instead
mikebroberts / slack.clj
Created Mar 17, 2014
Send a message to Slack incoming webhook in Clojure.
View slack.clj
(ns slack
(:require [clj-http.client :as client]
[ :as json]))
(defn send-to-slack
"Sends a simple message to slack using an 'incoming webhook'.
url will be of form: .
(Exact url you should use will appear on the slack integration page)
text will be any valid message.
This implementation could be expanded if you wanted to specify channel, username, etc.
brandonb927 /
Last active Sep 20, 2020
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
slpsys /
Created Jul 23, 2012
Marc's SF recommendations (off the top of my head)

things to see/do

  • musée mechanique
  • if you're in the financial district, check out the old pacific stock exchange (pre-hipster fixie movie Quicksilver with Kevin Bacon was filmed here!) it is now a gym. chuckle at that thought.
  • buena vista cafe (ridiculous irish coffee, get bombed so you can handle tourists)
  • sfmoma de young/park/beach/cal academy
  • twin peaks
  • walk around SOMA, where most startups live; majority are in square bounded by [Market, 1st, Folsom, 3rd]
  • do not walk around where new Twitter HQ will be; you will step on human feces, and it is next to one of the biggest peepshow theaters
erikh /
Created Mar 31, 2012 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
slpsys / mysql_annoyances.sql
Created Mar 8, 2012
Herein I chronicle things that piss me off.
View mysql_annoyances.sql
# Why do
DATE_DIFF('2012-3-1', '2012-3-2')
# and
DATE_ADD('2012-3-1', INTERVAL 1 DAY)
# have different naming conventions?
# this returns [0, n]
select count(*), datediff(`a`,`b`) from `table` group by datediff(`a`,`b`)
# this returns n - k, k > 0
You can’t perform that action at this time.