Skip to content

Instantly share code, notes, and snippets.

View matschaffer's full-sized avatar
🧡

Mat Schaffer matschaffer

🧡
View GitHub Profile
> curl -v http://grails.org
* Adding handle: conn: 0x7fcf6b80aa00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fcf6b80aa00) send_pipe: 1, recv_pipe: 0
* About to connect() to grails.org port 80 (#0)
* Trying 208.91.2.18...
* Connected to grails.org (208.91.2.18) port 80 (#0)
> GET / HTTP/1.1
root@vagrant:~# hhvm hello.hh
Fatal error: /root/hello.hh appears to be a Hack file, but you do not appear to be running the Hack typechecker. See the documentation at http://docs.hhvm.com/manual/en/install.hack.bootstrapping.php for information on getting it running. You can also set Hack.Lang.LookForTypechecker=0 to disable this check (not recommended).
root@vagrant:~# mv hello.hh hello.^C
root@vagrant:~# vi ..hhconfig^C
root@vagrant:~# vi .hhconfig
root@vagrant:~# touch .hhconfig
root@vagrant:~# hh_client
Server launched for /root
Spawned hh_server (child pid=22984)
@matschaffer
matschaffer / bluegreen.tf
Created January 10, 2015 20:28
bluegreen experiment
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "us-east-1"
}
resource "aws_elb" "experiments-main" {
name = "experiments-main"
availability_zones = ["us-east-1c", "us-east-1d"]
### Keybase proof
I hereby claim:
* I am matschaffer on github.
* I am matschaffer (https://keybase.io/matschaffer) on keybase.
* I have a public key whose fingerprint is 0F41 2290 38C3 B9C3 9C6E 0F1E 71EA CD00 4C06 389F
To claim this, I am signing this object:
@matschaffer
matschaffer / metrics.json
Created March 3, 2015 04:33
JSON body that causes trouble for heka's httpinput
{
"ts":"2015-03-03T04:06:46+0000",
"uname":"somehost.somedomain.com",
"metrics":{
"bucket.batch.add":{
"type":"timer",
"count":105,
"event_type":"calls",
"rate_unit":"s",
"mean_rate":0.509101,
#!/usr/bin/env bash
# Usage: sub tunnels [start|stop|restart|status|edit]
# Summary: Manage shared and user-specified SSH tunnels into your infrastructure
# Help: Manage shared and user-specified SSH tunnels into your infrastructure.
#
# Expects ssh to be configured for proxying. Run `sub check` to check your
# environment.
#
# This will attempt to use autossh if it's available.
#
@matschaffer
matschaffer / recover.rb
Created April 22, 2015 21:09
a recovery script for grabbing remaining previews for lost iPhoto/Photos Masters
require 'pathname'
require 'uri'
require 'fileutils'
# Expects a dir arg of exported photos and a .log which contains /var/log/system.log Photo messages generated during the export
dir = Pathname.new(ARGV[0])
log = Pathname.new(dir.basename.to_s + '.log')
recovered_dir = dir + 'recovered'
[hekad]
base_dir = "/tmp"
[StellarCoreMetricsInput]
type = "HttpInput"
url = "http://localhost:8000/metrics"
ticker_interval = 1
[StellarCoreMetricsFilter]
type = "SandboxFilter"
@matschaffer
matschaffer / gist:71fb91e6390d3928d8e2
Last active August 29, 2015 14:19
mats-guess.toml
[hekad]
maxprocs = 2
[statsd_input]
type = "StatsdInput"
stat_accum_name = "stat_accumulator"
address = ":8125"
[stat_accumulator]
type = "StatAccumInput"
@matschaffer
matschaffer / autorun.sh
Created April 29, 2015 07:06
autorun.sh
#!/bin/sh
set -e
IMAGE="$1"
VOLUME_PATH="${VOLUME_PATH:-$(pwd)/volumes}"
NAME="$(echo "${IMAGE}" | awk -F: '{print $1}' | awk -F/ '{print $NF}')"