Skip to content

Instantly share code, notes, and snippets.

@glasser
glasser / bcrypt.diff
Created December 6, 2016 01:58
bcrypt.diff
diff -ruN saved/built/bundle/programs/server/config.json unsaved/built/bundle/programs/server/config.json
--- saved/built/bundle/programs/server/config.json 2016-12-05 17:52:51.000000000 -0800
+++ unsaved/built/bundle/programs/server/config.json 2016-12-05 17:51:08.000000000 -0800
@@ -1,6 +1,6 @@
{
"meteorRelease": "METEOR@1.4.2.3",
- "appId": "ykn8om1jt9gmlgdoxdu",
+ "appId": "16imlabn8356hotzre7",
"clientPaths": {
"web.browser": "../web.browser/program.json"
package main
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"log"
"net/http"
cleanhttp "github.com/hashicorp/go-cleanhttp"
glasser@glasser-lyrid 1 ~/Scratch/tf-delete master % u= p= $ TF_LOG=TRACE terraform destroy -force
2016/06/27 16:13:28 [INFO] Terraform version: 0.7.0 dev ebb9b7a6967db2f19b67843e0cd4002940528196
2016/06/27 16:13:28 [DEBUG] Detected home directory from env var: /Users/glasser
2016/06/27 16:13:28 [DEBUG] Detected home directory from env var: /Users/glasser
2016/06/27 16:13:28 [DEBUG] Attempting to open CLI config file: /Users/glasser/.terraformrc
2016/06/27 16:13:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/06/27 16:13:28 [DEBUG] Detected home directory from env var: /Users/glasser
2016/06/27 16:13:28 [TRACE] Graph after step *terraform.ConfigTransformer:
module.middle - *terraform.GraphNodeConfigModule
glasser@glasser-lyrid 0 ~/Scratch/tf-delete master % u= p= $ TF_LOG=DEBUG terraform destroy -force
2016/06/27 16:12:35 [INFO] Terraform version: 0.7.0 dev ebb9b7a6967db2f19b67843e0cd4002940528196
2016/06/27 16:12:35 [DEBUG] Detected home directory from env var: /Users/glasser
2016/06/27 16:12:35 [DEBUG] Detected home directory from env var: /Users/glasser
2016/06/27 16:12:35 [DEBUG] Attempting to open CLI config file: /Users/glasser/.terraformrc
2016/06/27 16:12:35 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/06/27 16:12:35 [DEBUG] Detected home directory from env var: /Users/glasser
2016/06/27 16:12:35 [DEBUG] vertex module.middle: static expanding
2016/06/27 16:12:35 [DEBUG] Checking variable noop: var.param
2016/06/27 16:12:35 [DEBUG] No diff, not a noop
@glasser
glasser / oplog output
Last active June 8, 2016 06:10
oplog query for medium post
mongo> use local
mongo> db['oplog.rs'].find({ns: "prod.containers", "o2._id": "3KzZFpTRgt8NusfXo-q26j",
ts: {$gt: Timestamp(1457709700,0)}}).addOption(8).batchSize(1)
{ "ts" : Timestamp(1457709761, 4), "h" : NumberLong("6712804481729067037"), "v" : 2,
"op" : "u", "ns" : "prod.containers", "o2" : { "_id" : "3KzZFpTRgt8NusfXo-q26j" },
"o" : { "$set" : { "status" : "unhealthy" } } }
{ "ts" : Timestamp(1457709773, 3), "h" : NumberLong("-4571029055905183909"), "v" : 2,
"op" : "u", "ns" : "prod.containers", "o2" : { "_id" : "3KzZFpTRgt8NusfXo-q26j" },
"o" : { "$set" : { "status" : "healthy" } } }
{ "ts" : Timestamp(1457709854, 131), "h" : NumberLong("-1797464606787002322"), "v" : 2,
2016/05/17 16:00:27 [INFO] Terraform version: 0.7.0 dev
2016/05/17 16:00:27 [DEBUG] Detected home directory from env var: /Users/glasser
2016/05/17 16:00:27 [DEBUG] Detected home directory from env var: /Users/glasser
2016/05/17 16:00:27 [DEBUG] Attempting to open CLI config file: /Users/glasser/.terraformrc
2016/05/17 16:00:27 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/05/17 16:00:27 [DEBUG] Detected home directory from env var: /Users/glasser
2016/05/17 16:00:27 [TRACE] Graph after step *terraform.ConfigTransformer:
aws_security_group.a - *terraform.GraphNodeConfigResource
aws_vpc.main - *terraform.GraphNodeConfigResource
{
"version": 2,
"terraform_version": "0.7.0",
"serial": 0,
"modules": [
{
"path": [
"root"
],
"outputs": {},
@glasser
glasser / gist:e89bc1ff85a889aa58fd
Created February 24, 2016 01:50
failing self-tests
autoupdate: autoupdate ...
... fail!
=> match-timeout at ../../../../../tools/tool-testing/selftest.js:34
=> Pattern: running at
=> Last 100 lines:
1| [[[[[ /private/var/folders/8c/t8yc09jn173grvtlpc2sq1nr0000gn/T/mt-1glh6w/home/myapp ]]]]]
1|
1| => Started proxy.
1| => Started your app.
1|
package main
import (
"errors"
"net"
"net/http"
"sync"
)
// This file is a silly workaround for an issue caused by an interaction with
// This program is a workaround for
// https://github.com/docker/docker/issues/13914
//
// Sometimes docker fails to properly clean up DOCKER routing rules and then
// traffic to the new version of the container gets blackholed. Running this
// scripts frequently as root should mitigate this.
package main
import (
"bufio"