In order of first appearance in The Morning Paper.
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
| /* | |
| 2018/09/09 20:33:22 [GetCustomerBatchFn] batch size: 3 | |
| 2018/09/09 20:33:22 [GetCustomerAffiliationsBatchFn] batch size: 3 | |
| 2018/09/09 20:33:22 [GetGroupBatchFn] batch size: 4 | |
| 2018/09/09 20:33:22 [GraphQL result] total customers: 3 | |
| 2018/09/09 20:33:22 [GraphQL result]: | |
| {"data":{"CustomerVisit":{"items":[{"customer":{"affiliations":{"items":[{"group":{"id":1,"name":"first group"}},{"group":{"id":4,"name":"fourth group"}}]},"first_name":"first customer","id":1,"last_name":"first customer last name"}},{"customer":{"affiliations":{"items":[{"group":{"id":2,"name":"second group"}},{"group":{"id":4,"name":"fourth group"}}]},"first_name":"second customer","id":2,"last_name":"second customer last name"}},{"customer":{"affiliations":{"items":[{"group":{"id":3,"name":"third group"}},{"group":{"id":4,"name":"fourth group"}}]},"first_name":"third customer","id":3,"last_name":"third customer last name"}}]}}} | |
| */ | |
| package main |
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
| /* | |
| $ go run main.go | |
| rootObject() | took: 1.000260951s | |
| graphql.Do() | took: 367.401µs | |
| graphql.Do() | result: {"data":{"me":{"github":{"issues":[{"id":"100"},{"id":"101"}],"pullRequests":[{"id":"200"},{"id":"201"}]}}}} | |
| */ | |
| package main | |
| import ( |
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 example_test | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "hex" | |
| "io" | |
| ) | |
| // AES-GCM should be used because the operation is an authenticated encryption |
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 ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| ) |
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" | |
| "reflect" | |
| ) | |
| type Foo struct { | |
| FirstName string `tag_name:"tag 1"` | |
| LastName string `tag_name:"tag 2"` |
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
| # create an venv | |
| python3 -m venv myvenv | |
| # activate it | |
| python3 -m venv myvenv | |
| # initial migrate | |
| python manage.py migrate | |
| # run migrations | |
| python manage.py makemigrations myapp |
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
| # plugin to adjust (alt - arrows) margins | |
| # nudg.it | |
| # clone + guide lines | |
| alt - click | |
| # clone | |
| cmd - d | |
| # grid layout |
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 ( | |
| "log" | |
| "github.com/graphql-go/graphql" | |
| ) | |
| type Schema struct { |
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
| # inspect element | |
| cmd + shift + c | |
| # navigate through tabs | |
| cmd + [ | |
| cmd + ] |