jq is useful to slice, filter, map and transform structured json data.
brew install jq
| $ git branch -r --merged | | |
| grep origin | | |
| grep -v '>' | | |
| grep -v master | | |
| xargs -L1 | | |
| awk '{split($0,a,"/"); print a[2]}' | | |
| xargs git push origin --delete |
| package main | |
| import ( | |
| "log" | |
| "myserver" | |
| "net/http" | |
| ) | |
| const addr = "localhost:12345" |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io" | |
| "log" | |
| "mime/multipart" | |
| "net/http" | |
| "os" |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "path/filepath" | |
| ) | |
| func main() ([]string, error) { | |
| searchDir := "c:/path/to/dir" |
| package main | |
| import ( | |
| "archive/zip" | |
| "fmt" | |
| "io/ioutil" | |
| ) | |
| type myCloser interface { | |
| Close() error |
| package main | |
| import ( | |
| "log" | |
| "net/smtp" | |
| ) | |
| func main() { | |
| send("hello there") | |
| } |
| func readLines(path string) ([]string, error) { | |
| file, err := os.Open(path) | |
| if err != nil { | |
| return nil, err | |
| } | |
| defer file.Close() | |
| var lines []string | |
| scanner := bufio.NewScanner(file) | |
| for scanner.Scan() { |
| PS C:\Users\Administrator> choco install dotnet3.5 -debug -yes | |
| Chocolatey is running on Windows v 6.3.9600.0 | |
| Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old". | |
| Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old". | |
| Command line: "C:\ProgramData\chocolatey\choco.exe" install dotnet3.5 -debug -yes | |
| Received arguments: install dotnet3.5 -debug -yes | |
| NOTE: Hiding sensitive configuration data! Please double and triple | |
| check to be sure no sensitive data is shown, especially if copying | |
| output to a gist for review. |
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| "bytes" | |
| "path" | |
| "path/filepath" | |
| "mime/multipart" | |
| "io" |