Skip to content

Instantly share code, notes, and snippets.

View mrtazz's full-sized avatar
👨‍🔧
computer plumbing

Daniel Schauenberg mrtazz

👨‍🔧
computer plumbing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mrtazz on github.
  • I am mrtazz (https://keybase.io/mrtazz) on keybase.
  • I have a public key whose fingerprint is 2645 C34D 6808 41B6 DEA1 460B 5718 2B38 86AE 7F3C

To claim this, I am signing this object:

> echo -n "foo.bar:1|c" | nc -w0 -u 127.0.0.1 8125
> echo -n "foo.lerl:3|g" | nc -w0 -u 127.0.0.1 8125
> echo -n "foo.lol:33|ms" | nc -w0 -u 127.0.0.1 8125
> echo -n "foo.lol:43|ms" | nc -w0 -u 127.0.0.1 8125
> echo -n "foo.lol:53|ms" | nc -w0 -u 127.0.0.1 8125
@mrtazz
mrtazz / test-config.js
Last active December 15, 2015 13:49
StatsD example config
{
graphitePort: 2003
, graphiteHost: "127.0.0.1"
, port: 8125
, debug: true
, backends: ['./backends/graphite']
, histogram: [{ metric: "foo", bins: [0, 10, 20, 30] }]
, keyFlush: {
interval: "10000"
, log: "top-keys.log"
@mrtazz
mrtazz / Rakefile
Created November 12, 2012 18:47
a rakefile for generating pdf from latex
# Rakefile for building tex file
require "rake/clean"
require 'yaml'
# variables
BASE = "thesis"
TYPE = ".tex"
OUT = ".pdf"
TEXFILE = FileList[BASE+TYPE]
@mrtazz
mrtazz / ham.vim
Created October 27, 2012 03:22
when you need to go ham
"
" File: ham.vim
"
" When you need to go HAM
"
if &cp || (exists('g:loaded_ham_vim') && g:loaded_ham_vim)
finish
endif
let g:loaded_ham_vim = 1
@mrtazz
mrtazz / imap_check.py
Created September 18, 2012 04:06
quick script to check unread count of imap inbox
#!/usr/bin/env python
"""
small script to check for unread count on imap inbox
"""
import imaplib
IMAPSERVER = ''
USER = ''
PASSWORD = ''
@mrtazz
mrtazz / offlineimaprc
Created September 18, 2012 01:31
basic offlineimaprc
[general]
accounts = mail
maxsyncaccounts = 5
ui = ttyui
socktimeout = 90
[Account mail]
localrepository = maillocal
remoterepository = mailremote
autorefresh = 2
@mrtazz
mrtazz / client.rb
Created September 4, 2012 04:05
send chef-client output to syslog
require 'rubygems'
require 'syslog-logger'
log_level :info
Logger::Syslog.class_eval do
attr_accessor :sync, :formatter
end
log_location Logger::Syslog.new("chef-client")
module Bundler
class Dsl
def gem(name, *args)
['Vendetta', 'Fight for NY', 'Icon'].sample
end
end
end
@mrtazz
mrtazz / graphline.sh
Created July 20, 2012 12:42
shell function to quickly check a graphite graph
#
# shell function to print graphite graphs as sparklines in the terminal
# needs https://github.com/holman/spark
#
function graphline() {
GRAPHITEHOST="graphite.example.com"
if [ ! -n "$1" ]; then print "Usage: $0 metric [minutes]"; return 1; fi
if [ ! -n "$2" ]; then MINUTES=10 ; else MINUTES=$2; fi
curl -s "${GRAPHITEHOST}/render?from=-${MINUTES}minutes&target=${1}&format=raw" | cut -d"|" -f 2 | spark ;
}