Skip to content

Instantly share code, notes, and snippets.

View danslimmon's full-sized avatar

Dan Slimmon danslimmon

View GitHub Profile
Number:1FuzzBuzzNumber:2FuzzBuzzNumber:3FuzzBuzzNumber:4FuzzBuzzBuzzNumber:6FuzzBuzzNumber:7FuzzBuzzFizzBuzzNumber:9FuzzBuzzNumber:10FuzzBuzzNumber:11FuzzBuzzNumber:12FuzzBuzzNumber:13FuzzBuzzNumber:14FuzzBuzzNumber:15FuzzBuzzNumber:16FuzzBuzzNumber:17FuzzBuzzNumber:18FuzzBuzzNumber:19FuzzBuzzNumber:20FuzzBuzzNumber:21FuzzBuzzNumber:22FuzzBuzzNumber:23FuzzBuzzNumber:24FuzzBuzzNumber:25FuzzBuzzNumber:26FuzzBuzzNumber:27FuzzBuzzNumber:28FuzzBuzzNumber:29FuzzBuzzNumber:30FuzzBuzzNumber:31FuzzBuzzNumber:32FuzzBuzzNumber:33FuzzBuzzNumber:34FuzzBuzzNumber:35FuzzBuzzNumber:36FuzzBuzzNumber:37FuzzBuzzNumber:38FuzzBuzzNumber:39FuzzBuzzNumber:40FuzzBuzzNumber:41FuzzBuzzNumber:42FuzzBuzzNumber:43FuzzBuzzNumber:44FuzzBuzzNumber:45FuzzBuzzNumber:46FuzzBuzzNumber:47FuzzBuzzNumber:48FuzzBuzzNumber:49FuzzBuzzNumber:50FuzzBuzzNumber:51FuzzBuzzNumber:52FuzzBuzzNumber:53FuzzBuzzNumber:54FuzzBuzzNumber:55FuzzBuzzNumber:56FuzzBuzzNumber:57FuzzBuzzNumber:58FuzzBuzzNumber:59FuzzBuzzNumber:60FuzzBuzzNumber:61FuzzBuzzNumber:62FuzzBuz
@danslimmon
danslimmon / gist:4531440
Created January 14, 2013 16:48
Emperors playlist
Montezuma - Fleet Foxes
Hail Caesar - AC/DC
Napoleon - Ani DiFranco
Alexander - Charlotte Hatherley
Charlemagne In Sweatpants - The Hold Steady
Victoria - The Kinks
King Tut - Steve Martin and the Steep Canyon Rangers
Ave Genghis Khan - Mutantes
Show Me Love - Robyn
All Out Of Love - Air Supply
What About Sex? - Ice-T
Plenty for All - Hot Snakes
~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~~~~~
I'm In Hell - Microphones
Oh Why? - Little Richard
Some Weird Sin - Iggy Pop
~~~~~~~~~~~~~~~~~~~ - ~~~~~~~~~~~~~~~~~~~
Doctor Robert - The Beatles
@danslimmon
danslimmon / graphite_par_by_t.py
Created April 5, 2013 15:34
Parameterizes graphite data points by time. See <link to my blog post>
#!/usr/bin/python
# URL of Graphite server
GRAPHITE_BASEURL = "http://graphite.example.com/"
# Number of days' worth of data you want in the table
WINDOW = 30
# Metric that will appear on the X axis
TARGET_X = "stats.gauges.nconn"
# Metric that will appear on the Y axis
TARGET_Y = "stats.timers.resptime.upper_90"
dan@cleon:~$ :w
Dumbass.
import sys
import oven
import pot
import foodproc
import skillet
import colander
import casserole
def prepare_for_oven(skillet):
pasta.blockwait_event(lambda pasta: pasta.cooked)
@danslimmon
danslimmon / gist:5518231
Last active December 17, 2015 00:09
ggplot2 book typo
# In section 4.3, last code snippet,
bestfit <- geom_smooth(method="lm", se=F, color=alpha("steelblue", 0.5), size=2)
# should be
bestfit <- geom_smooth(method="lm", se=F, color="steelblue", alpha=0.5, size=2)
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKuF/zXZa+JbjvvKJOo5+bhPajJfDM3bc6vyyDGlj8vwve/Igfr4OwuoTVY9XviuXJXPaJwTWJvlicAku9J2xKA+UBajK5qhUbDXvUvHc+kmAmjWuzs9InWyPJlVDjuHD0c6SRCMJGnapnVRn/KHfvLelne2amjOtpVr3HrR5PW/tFaQv6gtMWER2YzkIAO7LZJfzL/oiUEDZxGQT8SwdUeiY/oyl5gtrixe6/DR5WKA3VPVYE8aMCW+apoIo84snZJOW9y77icpynibfuIihI7NhNQD1+ibeLs0XzkKA1SSc3y1Ssu7D1FFF8q2DzE55BF6RLG+cLksIg0qQunl8B [email protected]
"Fear Of Drowning" - British Sea Power
"Water Torture" - Herbie Hancock
"Behind The Bushes" - The Knife
"Man In The Box" - Alice In Chains
"I Confess" - Tom Tom Club
@danslimmon
danslimmon / read_opentsdb.r
Last active February 22, 2017 21:02
Reads data from OpenTSDB into an R data frame.
# Loads data from OpenTSDB.
#
# `server.url`: The URL of the OpenTSDB server (e.g. 'http://tsdb.example.com')
# `metrics`: List of strings specifying the metrics to pull (e.g.
# c("avg:web.cpu.user{host=*}", "sum:web.requests{type=login}")
# )
# `start.dt`: How far to go back in the time series, in any format OpenTSDB
# (e.g. "4h-ago")
# `end.dt`: Where to end the results (defaults to now)
# `datify`: Whether to convert timestamps to POSIXlt objects (defaults to TRUE)