Skip to content

Instantly share code, notes, and snippets.

View suncle1993's full-sized avatar
🎯
Focusing

Suncle Chen suncle1993

🎯
Focusing
View GitHub Profile
[alias]
aa = add .
ag = reset HEAD^ # again
b = branch
bd = branch -D
br = branch
ca = commit --all
cb = checkout -b
changed = update-index --no-assume-unchanged # revert op of `git unchanged`
ci = commit
@suncle1993
suncle1993 / int64set.go
Created March 2, 2022 07:15
golang int64类型的集合
package main
import (
"fmt"
"sync"
)
// Int64Set int64类型的集合
type Int64Set struct {
sync.RWMutex
@suncle1993
suncle1993 / golangci-lint-fix.py
Last active March 2, 2022 08:07
批量修复golang ci
import re
import subprocess
# 不自动处理的规则
ex = ("SA4006", "structcheck") # 不自动处理的规则
# 忽略error返回白名单,白名单才处理
errwl = {
"ymetrics": "_ = ",
"yalert": "_ = ",
package main
import (
"fmt"
"strings"
"github.com/spf13/cobra"
)
func main() {
@suncle1993
suncle1993 / test_string.go
Created March 2, 2022 08:03
测试string的并发写panic
package main
import (
"fmt"
"time"
)
var (
testString string
)
@suncle1993
suncle1993 / docker-compose.yml
Created January 5, 2023 05:55
docker-compose for local env
services:
db:
image: 'mysql:5.7'
container_name: mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
ports:
- '3306:3306'
volumes:
- './mysql/data:/var/lib/mysql'