Skip to content

Instantly share code, notes, and snippets.

View charliek's full-sized avatar

Charlie Knudsen charliek

View GitHub Profile
@charliek
charliek / fastly_talk.md
Created November 25, 2015 23:13
Globally Distributed Purging System Links
@charliek
charliek / docker-compose.yml
Last active April 2, 2016 23:06
Zipkin with Kafka
kafka:
image: spotify/kafka
environment:
- ADVERTISED_HOST
- ADVERTISED_PORT=9092
ports:
- 2181:2181
- 9092:9092
cassandra:
@charliek
charliek / parameter_test.js
Created March 20, 2013 01:42
Parameter test
var paramPrefix = 'charliek';
var iterations = 1000;
function foundAll(postValues, rtnStr) {
var notFound = ''
$.each(postValues, function( key, value ) {
var expected = key + ':' + value;
if(rtnStr.indexOf(expected) == -1) {
notFound += '\t' + expected + '\n'
}
@charliek
charliek / User.py
Last active December 15, 2015 03:59
Sublime Preferences
{
"bold_folder_labels": true,
"close_windows_when_empty": false,
"color_scheme": "Packages/Theme - Aqua/Color Schemes/Tomorrow Night Aqua.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".tags*",
"*.pyc",
#!/usr/bin/env groovy
@Grapes([
@Grab(group = 'com.rabbitmq', module = 'amqp-client', version = '2.6.1'),
@Grab(group = 'org.codehaus.jackson', module = 'jackson-mapper-asl', version = '1.8.3')
])
import com.rabbitmq.client.ConnectionFactory
import com.rabbitmq.client.Connection
import com.rabbitmq.client.Channel
import com.rabbitmq.client.QueueingConsumer
@charliek
charliek / bash
Created April 13, 2012 21:06 — forked from haf/bash
Installing graphite Ubuntu 11.10
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
@charliek
charliek / redis-lookup.groovy
Created October 22, 2011 05:14
lookup a redis key
#!/usr/bin/env groovy
@Grapes([
@Grab('redis.clients:jedis:1.5.1'),
@GrabConfig(systemClassLoader=true)
])
import redis.clients.jedis.*
Jedis jedis = new Jedis("localhost")
println jedis.get(args[0])
@charliek
charliek / rabbit-listen.groovy
Created October 22, 2011 05:13
simple rabbitmq json listener
#!/usr/bin/env groovy
@Grapes([
@Grab(group = 'com.rabbitmq', module = 'amqp-client', version = '2.6.1'),
@Grab(group = 'org.codehaus.jackson', module = 'jackson-mapper-asl', version = '1.8.3')
])
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.QueueingConsumer
require 'rubygems'
require 'net/toc'
def send_aol_message(user, message)
client = Net::TOC.new("notifier", "password")
client.connect
sleep 3
buddy = client.buddy_list.buddy_named(user)
buddy.send_im(message) if buddy.available?
sleep 3
;(require 'python-mode)
;; our dtd mode
(autoload 'dtd-mode "tdtd" "Major mode for SGML and XML DTDs." t)
(autoload 'dtd-etags "tdtd"
"Execute etags on FILESPEC and match on DTD-specific regular expressions."
t)
;; setup js2 mode
(setq load-path (append (list (expand-file-name "~/.emacs.d/js2")) load-path))