This file contains hidden or 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 ( | |
| "bufio" | |
| "bytes" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| // "log" |
This file contains hidden or 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" | |
| api "github.com/andybons/hipchat" | |
| "github.com/daneharrigan/hipchat" | |
| "github.com/joho/godotenv" | |
| "os" | |
| "strings" |
This file contains hidden or 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
| pg_restore -l cr2.dump > db.list | |
| # edit db.list | |
| pg_restore --verbose --clean --no-acl --no-owner -h {HOST} -U {USER} -d {DATABASE} -L db.list cr2.dump |
This file contains hidden or 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 ( | |
| "bytes" | |
| "fmt" | |
| "github.com/gorilla/sessions" | |
| "html/template" | |
| "net/http" | |
| "strconv" | |
| ) |
This file contains hidden or 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" | |
| "os" | |
| "strings" | |
| ) | |
| //History of recent posts |
This file contains hidden or 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" | |
| "gopkg.in/yaml.v1" | |
| "time" | |
| ) | |
| type timeUnMarsh struct { | |
| time.Time |
This file contains hidden or 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 | ruby -e "STDIN.readlines.select{|l|l[/memory_total/]}.map{|l| l.split(/\s+/)}.map{|l| puts \"#{l[2][/T[\d+:]+/][1..-1]} #{l[9][/([\d.]+)MB/][0..-3]}\"}" |
This file contains hidden or 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
| # this can be done anytime | |
| heroku addons:add heroku-postgresql:standard-yanari --app nav-chronos; heroku pg:wait | |
| # about 3m30s | |
| heroku maintenance:on | |
| heroku ps:scale worker=0 | |
| heroku pgbackups:capture --expire | |
| # less than 20 min |
This file contains hidden or 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 ( | |
| "encoding/xml" | |
| "fmt" | |
| "log" | |
| ) | |
| type Reading struct { | |
| RType string `xml:"r_type,attr"` |
This file contains hidden or 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 'guard' | |
| require 'guard/plugin' | |
| class Guard::Mygo < Guard::Plugin | |
| def run_all | |
| system 'go test ./...' | |
| end | |
| def run_on_changes(paths) | |
| paths.each do |file| |