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
// 生成二维码 | |
// 参考文档: 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 |
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
// 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
#!/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
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
package main | |
import ( | |
"fmt" | |
"log" | |
"strconv" | |
"sync" | |
"time" | |
) |
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
// 横坐标 | |
var x_axis = ['', '', '', '', '', '', '', '']; | |
// 纵坐标 | |
var y_axis = [ | |
'8.华夏兴华H', | |
'7.华夏兴华A', | |
'6.华夏稳盛', | |
'5.华夏翔阳LOF', | |
'4.华夏成长', | |
'3.华夏回报2号', |
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
package main | |
import ( | |
"image" | |
) | |
func main() { | |
// 需要被马赛克的图片 | |
var img image.Image | |
// 宽 |
- 开启监听
package main
import (
"net/http"
_ "net/http/pprof"
)
OlderNewer