Skip to content

Instantly share code, notes, and snippets.

View rafrombrc's full-sized avatar

Rob Miller rafrombrc

  • Mozilla Corp
  • Oakland, CA
View GitHub Profile
@rafrombrc
rafrombrc / mididings_xtouch_proxy.py
Last active November 24, 2022 05:37
Script using mididings to improve the functionality of behringer x-touch with Ardour DAW
"""
Very simple mididings script to enhance the functionality of a behringer
x-touch mixing control surface when used with a DAW via the mackie control
protocol (MCP). Written for use with Ardour and an x-touch running firmware
v1.21. Might work with other DAWs and firmware versions, might steal your
wallet and drink your booze. Idea stolen from a similar effort done with MaxMSP
/ PureData for use with Cubase:
https://www.pgaudio.com.br/site/improve-mackie-controller-xtouch-integration-daw
@rafrombrc
rafrombrc / hekad.toml
Created July 7, 2015 18:19
Carbon TCP reconnect example
[hekad]
share_dir = "/home/rob/go/heka/build/heka/share/heka"
[StatsdInput]
[StatAccumInput]
emit_in_fields = true
ticker_interval = 1
[PayloadEncoder]
@rafrombrc
rafrombrc / http_req_stat_filter.lua
Last active August 29, 2015 14:18
Sample Heka SandboxFilter emitting graphite format stats from HTTP request data
require "string"
require "math"
require "table"
require "cjson"
local status_codes = {}
local request_times = {}
local ticker_interval = read_config("ticker_interval") or error("must provide ticker_interval")
local percent_thresh = read_config("percent_threshold") or 90
@rafrombrc
rafrombrc / etc_init.d_hekad
Created October 27, 2014 20:55
Experimental RHEL6.4 hekad init script
#!/bin/sh
#
# hekad <summary>
#
# chkconfig: 2345 80 20
# description: Starts and stops a single heka instance on this system
#
### BEGIN INIT INFO
# Provides: Heka
@rafrombrc
rafrombrc / hekad.toml
Created September 27, 2014 01:12
deb minimal default hekad config
[hekad]
maxprocs = 2
[TcpInput]
address = "127.0.0.1:5565"
parser_type = "message.proto"
decoder = "ProtobufDecoder"
[StatAccumInput]
[TcpInput]
address = ":8325"
decoder = "StatsToFieldsDecoder"
parser_type = "regexp"
delimiter = 'pdxnplogmq01\.ping\.ping_droprate\.127_0_0_1'
delimiter_location = "start"
[StatsToFieldsDecoder]
[stat_graph]
[TcpInput]
address = ":8325"
[StatsToFieldsDecoder]
[scribble_statmetric]
type = "ScribbleDecoder"
[scribble_statmetric.message_fields]
Type = "heka.statmetric"
var tmp map[string]interface{}
tmp, ok = v.(map[string]interface{})
if !ok {
return result, errors.New("invalid path")
}
v, ok = tmp[ss[1]]
if !ok {
return result, errors.New("invalid path")
}
require "cjson"
local fields = {
values = {},
interval = 0,
plugin = "",
plugin_instance = "",
["type"] = "",
type_instance = ""
}
@rafrombrc
rafrombrc / testlisten.go
Created September 12, 2014 21:16
listen testing
package main
import (
"log"
"net"
"time"
)
func accept(l net.Listener, sigBack chan struct{}) {
conn, err := l.Accept()