See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| // thanks to: | |
| // https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation | |
| // https://studygolang.com/articles/17394 | |
| // https://stackoverflow.com/questions/54395407/zap-logging-with-1-customized-config-and-2-lumberjack | |
| // Please test and debug it before putting it in production. | |
| package logger | |
| import ( | |
| "fmt" | |
| "os" |
| I learned a lot from watching this youtube video - https://www.youtube.com/watch?v=D3SrjuTaUQU | |
| // Gin Route File | |
| import ( | |
| ... | |
| "github.com/mycompany/menu/graph/dataloader/meal_tag" | |
| ) |
| # ================================================================================================== | |
| # | |
| # NOTICE | |
| # | |
| # This gist is no longer maintained. It was moved to repo: | |
| # | |
| # https://github.com/maratori/golangci-lint-config | |
| # | |
| # Full history and all v2 releases are preserved in the repo. | |
| # |
| // NOTE | |
| // This gist was created long time ago. | |
| // According to zap's doc, now we can use zapcore.AddSync to directly add lumberjack as a zap sync | |
| // see https://github.com/uber-go/zap/blob/master/FAQ.md#does-zap-support-log-rotation | |
| // So I wrote a new gist if anyone is interested: | |
| // https://gist.github.com/rnyrnyrny/a6dc926ae11951b753ecd66c00695397 | |
| // 下面的代码已经过时了,现在直接用zapcore.AddSync就行,参考zap文档 | |
| // thanks to: |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| import axios from 'axios'; | |
| class Service { | |
| constructor() { | |
| let service = axios.create({ | |
| headers: {csrf: 'token'} | |
| }); | |
| service.interceptors.response.use(this.handleSuccess, this.handleError); | |
| this.service = service; | |
| } |
| /** | |
| * Axios Request Wrapper | |
| * --------------------- | |
| * | |
| * @author Sheharyar Naseer (@sheharyarn) | |
| * @license MIT | |
| * | |
| */ | |
| import axios from 'axios' |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |