select * from uptime;
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
#!/usr/bin/env zsh | |
function aws-rds-describe() { | |
zparseopts -D -E -A opts -- o: | |
output=${opts[-o]:-"table"} | |
name=${1} | |
query=( | |
"DBInstances[]" | |
".{" |
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
### Keybase proof | |
I hereby claim: | |
* I am jamescarr on github. | |
* I am jamescarr (https://keybase.io/jamescarr) on keybase. | |
* I have a public key ASAiU20sGsNecdzYGqyyswSbo3qJw380XF_-HrTCY1cNUAo | |
To claim this, I am signing this object: |
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
for { | |
select { | |
case m, ok := <-c: | |
if !ok { | |
breakl | |
} | |
handle(m) | |
case <-time.After(1 * time.Minute): | |
fmt.Println("timed out") | |
break |
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
exch := msg.Exchange | |
if val, ok := msg.Headers["x-original-exchange"]; ok { | |
exch = msg.Headers["x-original-exchange"] | |
} |
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
err := ch.ExchangeDeclare( | |
"unrouted", // name | |
"topic", // type | |
true, // durable | |
false, // auto-deleted | |
false, // internal | |
false, // noWait | |
nil, | |
) |
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 ( | |
"database/sql" | |
_ "github.com/lib/pq" | |
"log" | |
) | |
func failOnError(e error) { | |
if e != nil { |
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 ( | |
"crypto/md5" | |
"crypto/sha1" | |
"crypto/sha256" | |
"fmt" | |
"hash" | |
) |
NewerOlder