Skip to content

Instantly share code, notes, and snippets.

module Test
class Log
attr_accessor :gc, :name
def initialize(name, gc=nil)
@name = name
@gc = gc || {}
end
def log(data)
puts data.merge(:name => @name).inspect
[ad-kv]
REGEX = (?<_KEY_1>[\w-]+)=(?<_VAL_1>[^\r\n]*)
MV_ADD = true
[perfmon-kv]
DELIMS = "\n","="
@asenchi
asenchi / init.el
Created April 14, 2014 02:31
Basic Emacs init.el
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(when window-system (set-exec-path-from-shell-PATH))
(require 'cl)
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
@asenchi
asenchi / canary-heka.lua
Created May 8, 2014 23:33
canary.io -> Heka lua decoder
require "cjson"
-- Generic decoder for Canary JSON data. This will extract all JSON
-- keys and add them to the `Fields` variable of the created
-- Heka message.
--
-- Example use:
--
-- [CanaryDecoder]
-- type = "SandboxDecoder"
FROM ubuntu:14.04
MAINTAINER Chance Zibolski <chance.zibolski@gmail.com> (@chance)
RUN apt-get update && \
apt-get install -yq --no-install-recommends \
build-essential \
bzr \
ca-certificates \
cmake \
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
--[[
Graphs the Cpu Load and number of processes of the system running heka.
Config:
- sec_per_row (uint, optional, default 60)
@asenchi
asenchi / ics-states.yml
Created September 2, 2014 21:00
This is a YAML representation of the Incident Command System (ICS) states. These were used at Heroku to build their ICS, watch more here: http://www.heavybit.com/library/video/2014-06-17-blake-gentry
---
state: 0
name: "State 0"
description: "Everything Healthy"
color: green
metrics:
- blah1
- blah2
- blah3
- blah4
@asenchi
asenchi / gist:ce8068959c2be01fba57
Last active August 29, 2015 14:07
Letter to Governor Rick Snyder of Michigan regarding HB5606
Hello Sir,
I am writing to let you know that you must veto this bill:
http://www.legislature.mi.gov/documents/2013-2014/billengrossed/House/htm/2014-HEBH-5606.htm.
As a governor who has touted his business abilities you know that this bill is
worded in such a way as to keep competition out of Michigan. This bill cannot
pass.
Michigan is a state with a deep history in the car industry. Innovation and
• hvalvatn:release (sfl4j) asenchi$ ctest
Test project /Users/asenchi/simple/src/mozilla-services/lua_sandbox/release
Start 1: test_sandbox
1/1 Test #1: test_sandbox ..................... Passed 8.48 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 8.49 sec
• hvalvatn:release (sfl4j) asenchi$ cmake -DCMAKE_BUILD_TYPE=release ..
-- The C compiler identification is AppleClang 6.0.0.6000056
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found Git: /usr/local/bin/git (found version "2.0.1")
Doxygen was not found, the documentation pages will not be generated
-- Configuring done
-- Generating done