This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'octokit' | |
require 'business_time' | |
BusinessTime::Config.beginning_of_workday = "6:00 am" | |
BusinessTime::Config.end_of_workday = "6:00 pm" | |
client = Octokit::Client.new( | |
:access_token => ENV['GITHUB_API_TOKEN'], | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/Knetic/govaluate" | |
) | |
type Entity struct { | |
Environment string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================== | |
WARNING: DATA RACE | |
Write at 0x00c420001eb8 by goroutine 24: | |
net/http.http2ConfigureServer() | |
/usr/local/go/src/net/http/h2_bundle.go:3938 +0x274 | |
net/http.(*Server).onceSetNextProtoDefaults() | |
/usr/local/go/src/net/http/server.go:2986 +0x15f | |
net/http.(*Server).onceSetNextProtoDefaults_Serve() | |
/usr/local/go/src/net/http/server.go:2969 +0x5e | |
net/http.(*Server).(net/http.onceSetNextProtoDefaults_Serve)-fm() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type mockStore struct { | |
mock.Mock | |
// Entities | |
getEntityByID func(id string) (*types.Entity, error) | |
updateEntity func(e *types.Entity) error | |
deleteEntity func(e *types.Entity) error | |
getEntities func() ([]*types.Entity, error) | |
// Checks | |
getChecks func() ([]*types.Check, error) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"sync" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" | |
"runtime/pprof" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/gorilla/websocket" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ ping google.com | |
PING google.com (172.217.5.110) 56(84) bytes of data. | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=1 ttl=53 time=291 ms | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=5 ttl=53 time=59.3 ms | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=6 ttl=53 time=500 ms | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=12 ttl=53 time=5139 ms | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=15 ttl=53 time=10948 ms | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=22 ttl=53 time=19375 ms | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=21 ttl=53 time=20383 ms | |
64 bytes from sfo03s07-in-f14.1e100.net (172.217.5.110): icmp_seq=23 ttl=53 time=18351 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat tf-test.log | |
2017/01/31 16:37:17 [INFO] Terraform version: 0.8.5 | |
2017/01/31 16:37:17 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.8.5/bin/terraform", "fmt", "test.tf"} | |
2017/01/31 16:37:17 [DEBUG] Detected home directory from env var: /Users/grep | |
2017/01/31 16:37:17 [DEBUG] Detected home directory from env var: /Users/grep | |
2017/01/31 16:37:17 [DEBUG] Attempting to open CLI config file: /Users/grep/.terraformrc | |
2017/01/31 16:37:17 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2017/01/31 16:37:17 [DEBUG] Detected home directory from env var: /Users/grep | |
2017/01/31 16:37:17 [DEBUG] plugin: waiting for all plugin processes to complete... | |
2017/01/31 16:38:06 [INFO] Terraform version: 0.8.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'll be omitting syscalls with ellipsis. | |
The first thing that happens after you press enter is that bash resolves | |
curl to /usr/bin/curl and then forks(). The strace output is from the | |
forked process. | |
Fist execve() the /usr/bin/curl binary and pass an array of arguments to it. | |
execve("/usr/bin/curl", ["curl", "http://github.com"], [/* 8 vars */]) = 0 | |
... |