See how a minor change to your commit message style can make a difference.
Tip
Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
// 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" | |
) |
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit | |
# Copyright (c) 2021-2025 Marat Reymers | |
## Golden config for golangci-lint v2.1.5 | |
# | |
# This is the best config for golangci-lint based on my experience and opinion. | |
# It is very strict, but not extremely strict. | |
# Feel free to adapt it to suit your needs. | |
# If this config helps you, please consider keeping a link to this file (see the next comment). |
// 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.
Tip
Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
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 |