View hekad.toml
[StatsdInput]
address = "localhost:8125"
[StatAccumInput]
type = "StatAccumInput"
ticker_interval = 1
emit_in_fields = true
percent_threshold = 95
[statmetric_atlas_encoder]
View task-hack.rb
~/safecast/safecastapi staging-postgis-setup* 43s
❯ dropdb safecast_test
~/safecast/safecastapi staging-postgis-setup*
❯ rake db:test:prepare
[RailsAdmin] RailsAdmin initialization disabled by default. Pass SKIP_RAILS_ADMIN_INITIALIZER=false if you need it.
rake aborted!
ActiveRecord::StatementInvalid: PG::Error: ERROR: PostGIS is already installed in schema 'postgis', uninstall it first
: CREATE EXTENSION IF NOT EXISTS postgis
/Users/mat/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-3.2.21/lib/active_record/connection_adapters/postgresql_adapter.rb:1163:in `exec'
View gist:243c400c0b112bc27fc0
safecast_development=# create extension if not exists postgis;
ERROR: PostGIS is already installed in schema 'postgis', uninstall it first
safecast_development=# drop extension postgis;
ERROR: extension "postgis" does not exist
View house.applescript
on slashCommand(cmd)
tell application "System Events"
delay 0.1
key code 44
delay 0.1
keystroke cmd
delay 0.1
keystroke return
end tell
return 0
View running_instances.sh
#!/bin/sh
aws ec2 describe-instances |\
jq -r '.Reservations[].Instances[] |
select(.State.Code == 16) |
[
( .Tags[] | select(.Key == "Name") | .Value ),
( .Tags[] | select(.Key == "cost-center") | .Value),
.InstanceId,
.InstanceType
View gist:5fa6642d0f8cc17ac0c6
~
❯ curl -v https://api.stellar.org
* Rebuilt URL to: https://api.stellar.org/
* Hostname was NOT found in DNS cache
* Trying 108.162.204.108...
* Connected to api.stellar.org (108.162.204.108) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
* Server certificate: *.stellar.org
* Server certificate: COMODO RSA Domain Validation Secure Server CA
* Server certificate: COMODO RSA Certification Authority
View corecapture
#!/usr/bin/env bash
echo a
echo b
echo ----
echo c
echo d
echo ----
echo
View hekad.toml
# -*- mode: toml -*-
# vi: set ft=toml :
[hekad]
base_dir = "/tmp"
[on_space]
type = "TokenSplitter"
delimiter = " "
View gist:4912279e49dce41ab9b2
#!/usr/bin/env bash
URL="http://a0.awsstatic.com/pricing/1/ec2/ri-v2/linux-unix-shared.min.js"
(echo 'function callback(data) { console.log(JSON.stringify(data)); }'; curl -s "$URL") |\
node |\
jq -r '.config.regions[] |
select(.region == "us-east-1") |
.instanceTypes[] |
[
View gist:2fc3af0387eceeeaf614
FROM (base)
MAINTAINER Mat Schaffer <mat@stellar.org>
ENV (foo)_VERSION 1.4.3
EXPOSE (port)
ADD install /
RUN /install