Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
| // Checkout the readme for this here: https://github.com/tilaklodha/google-authenticator | |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/hmac" | |
| "crypto/sha1" | |
| "encoding/base32" | |
| "encoding/binary" |
| grep -L <TEXT> --exclude "<EXCLUDE PATTERN>" */**/* |
| // CSVToMap takes a reader and returns an array of dictionaries, using the header row as the keys | |
| func CSVToMap(reader io.Reader) []map[string]string { | |
| r := csv.NewReader(reader) | |
| rows := []map[string]string{} | |
| var header []string | |
| for { | |
| record, err := r.Read() | |
| if err == io.EOF { | |
| break | |
| } |
| #cloud-config | |
| ssh_authorized_keys: | |
| - ssh-rsa xyz | |
| write_files: | |
| - path: /var/lib/rancher/conf/cloud-config.yml | |
| permissions: "0644" | |
| owner: root | |
| content: | | |
| #cloud-config | |
| ssh_authorized_keys: |
| //This function was used in my test rig to convert elasticsearch results to a KML structure which is | |
| // later fed to an iFrame wrapping the GoogleEarth plugin | |
| var data=[]; | |
| var buckets=inData.aggregations.map.buckets; | |
| function addCommas(nStr) | |
| { | |
| nStr += ''; |
| [ | |
| { "command": "set_mark" }, | |
| { "command": "move_to", "args": {"to": "eol"} }, | |
| { "command": "insert_snippet", "args": {"contents": "${TM_LINE_TERMINATOR:;}"} }, | |
| { "command": "swap_with_mark" } | |
| ] |