redis-cli -n 1 keys "keyword*" | xargs redis-cli -n 1 del
This file contains 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
git log --pretty=format:'√ %s %C(bold blue)<%an>%Creset %cr' --abbrev-commit --date=relative --no-merges -5 |
This file contains 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
#!/bin/bash | |
ctx=$(kubectl config current-context) | |
namespace=$(kubectl config view --minify --output 'jsonpath={..namespace}'; echo) | |
echo $ctx $namespace | |
while true |
This file contains 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
// protoc ./*.proto --js_out=import_style=commonjs:./ --grpc-web_out=import_style=typescript,mode=grpcweb:./ | |
var pb = require('./grpc_pb'); | |
var svc = require('./grpc_grpc_pb'); | |
var grpc = require('@grpc/grpc-js'); | |
// 证书 | |
const tls = `-----BEGIN CERTIFICATE----- | |
-----END CERTIFICATE-----` |
This file contains 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
func Wrap(val *string,name string,timeout time.Duration) func() { | |
return func() { | |
time.Sleep(timeout) | |
*val = name | |
} | |
} | |
func main() { | |
for i := 97; i < 123; i++ { | |
go func(i int) { |
This file contains 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
// 生成二维码 | |
// 参考文档: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.createQRCode.html | |
const ( | |
// 自己服务器上传图片的请求地址 | |
upload_url = "http://localhost:8080/upload" | |
) | |
const ( | |
// 获取token |
NewerOlder