jq is useful to slice, filter, map and transform structured json data.
brew install jq
git log --oneline -1 <PR-BRANCH>
git push -f origin :
package main | |
import ( | |
"reflect" | |
"strings" | |
) | |
func makeChannel(t reflect.Type, chanDir reflect.ChanDir, buffer int) reflect.Value { | |
ctype := reflect.ChanOf(chanDir, t) | |
return reflect.MakeChan(ctype, buffer) |
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos | |
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423 | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
# (if you're backing up a user's repos instead, this should be your GitHub username) | |
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API) |
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/davecgh/go-spew/spew" | |
) | |
func main() { |
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
) | |
type Notification struct { | |
Error error `json:"error"` |
package main | |
import "fmt" | |
func main() { | |
user := User{} | |
// Set the group: | |
groupSetter("admin", user) |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io" | |
"log" | |
) |
package main | |
import ( | |
"bytes" | |
"encoding/gob" | |
"fmt" | |
) | |
type MyFace interface { | |
A() |
APIs: | |
- | |
method: GET | |
url: http://idowhcjymo.apps.wk-0.us-east-1.aws.dev.magalix.cloud:8001/rpush/guestbook/Hello%20World | |
body: ~ | |
PATTERNS: | |
- | |
cron: "0 1 * * * *" # Run every hh:01 (00:01, 01:01, 02:55, ...) | |
concurrent_calls: 10 |