Skip to content

Instantly share code, notes, and snippets.

View charliek's full-sized avatar

Charlie Knudsen charliek

View GitHub Profile
@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 / fastly_talk.md
Created November 25, 2015 23:13
Globally Distributed Purging System Links
@charliek
charliek / keybase.md
Created July 22, 2015 16:05
keybase.md

Keybase proof

I hereby claim:

  • I am charliek on github.
  • I am charliek (https://keybase.io/charliek) on keybase.
  • I have a public key whose fingerprint is DC8C EDB1 9FA9 DAA8 4730 68F4 3174 7F56 E128 5464

To claim this, I am signing this object:

@charliek
charliek / vsub.pl
Created September 19, 2014 14:50
Simple perl environment variable substitution
#!/usr/bin/perl
use strict;
use warnings;
my $num_args = $#ARGV + 1;
if ($num_args != 2) {
print "\nUsage: vsub.pl [input file] [output file]\n";
exit 1;
}
@charliek
charliek / loadEnv.pl
Created September 16, 2014 14:37
Perl Environment Variable Loader
#!/usr/bin/perl
# Take in a file containing environment variables line by line
# and if the variable is not yet set print out an export command
# that can be evaluated by bash. This allows us to specify environment
# values in a much easier format than otherwise allowed. For example:
#
# # Comments are expressed with a leading hash sign and on their own line.
# # Empty lines are ok.
#
@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])