Skip to content

Instantly share code, notes, and snippets.

View tdooner's full-sized avatar

Tom Dooner tdooner

View GitHub Profile
@tdooner
tdooner / Code.gs
Created September 6, 2018 16:22
Brigade Onboarding Form v1.0
/*
* To set up this onboarding flow for your Brigade, first create a Google Form for
* the onboarding survey you'll use during meetings.
*
* This form must have a field called "Email Address".
* Configure the form to dump its results into a Google Spreadsheet.
*/
/*
* 1. Customize these variables!
@tdooner
tdooner / POLICY.md
Created September 9, 2017 05:44
Irma Response Privacy Policy

The Irma Response chat application takes your privacy seriously.

Data you provide into the chat will be shared with trusted third parties only to the extent that we believe is necessary to get you the help you need.

We will not sell your information.

Repro details

» node --version
v5.0.0

» $(npm bin)/mapshaper --version
0.3.32

» $(npm bin)/mapshaper -i input_georgia_house_district_3.json -simplify visvalingam 10% -o output.json force precision=0.005
Wrote output.json
#!/bin/bash
before=$1
after=$2
shopt -s globstar # let ** glob work
if [ ! -d app/assets/components/$before ]; then
echo "could not find component directory"
exit 1
fi
tom@si ~/brigade (master %) » ls app/views/**/*.html.haml | grep -v admin | grep -v style_guide | grep -v api/docs | grep -v emails | xargs wc -l
5 app/views/activity_map/index.html.haml
4 app/views/application/show.html.haml
5 app/views/elections/show.html.haml
3 app/views/errors/not_found.html.haml
4 app/views/facebook_shares/complete.html.haml
5 app/views/get_verified/show.html.haml
3 app/views/home/logged_out_home.html.haml
9 app/views/ios_app_cookies/show.html.haml
153 app/views/layouts/application.html.haml
@tdooner
tdooner / hi-josh
Last active December 15, 2015 02:11
hi josh
can you send me rent money please?
time="2015-12-09T19:55:09.554822173Z" level=debug msg="authorizing request" environment=production go.version=go1.4.2 http.request.host=[our-registry] http.request.id=ff863c72-e8d4-401e-8092-eb863cd37fbf http.request.method=PUT http.request.remoteaddr=[...] http.request.uri="/v2/brigade-ruby-2.2.3/blobs/uploads/4a427f49-1355-483e-8970-1be08226f82b?_state=[...]&digest=sha256%3A3e50e9d212ab239ad8a73309ad12c53e0a9d2ca92135d2b7fff08f07f9f5e321" http.request.useragent="docker/1.8.3 go/go1.4.2 git-commit/f4bf5c7 kernel/3.10.0-229.el7.x86_64 os/linux arch/amd64" instance.id=f75653e6-a2c5-4e2c-a6e8-4ed30d141d17 service=registry vars.name=brigade-ruby-2.2.3 vars.uuid=4a427f49-1355-483e-8970-1be08226f82b version="v2.1.0+unknown"
time="2015-12-09T19:55:09.55503649Z" level=debug msg="(*linkedBlobStore).Resume" environment=production go.version=go1.4.2 http.request.host=[our-registry] http.request.id=ff863c72-e8d4-401e-8092-eb863cd37fbf http.request.method=PUT http.request.remoteaddr=[...] http.request.uri="/v2/brigade-r
{
"schedule": "R/2014-09-25T17:22:00Z/PT2M",
"name": "tomtest",
"shell": false,
"container": {
"type": "DOCKER",
"image": "tdooner/tdooner-chronos-test",
"network": "BRIDGE",
"volumes": []
},
# To use this script, download a CSV of incidents from Pagerduty, e.g
# https://causes.pagerduty.com/csv/incidents?since=2015-08-10T00:00:00-07:00&until=2015-08-17T23:59:59-07:00
require 'csv'
require 'date'
ENV['TZ'] = 'America/Los_Angeles'
def average(array, round = 1)
(array.inject(0, :+) / array.length.to_f).round(round)
end
@tdooner
tdooner / -
Created February 17, 2015 22:36
#!/usr/bin/env ruby
require 'yaml'
require 'base64'
contents = "#cloud-config\n" + {
'bootcmd' => [
'yum remove zsh -y',
'yum install zsh -y'
]
}.to_yaml