自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(267)
  • 资源 (3)
  • 收藏
  • 关注

原创 vscode中设置golang启动

【代码】vscode中设置golang启动。

2023-11-06 15:10:40 180

原创 Ubuntu 18.04.6 apt.list

【代码】Ubuntu 18.04.6 apt.list。

2023-04-03 08:36:40 165

原创 嵌入式学习笔记

linux 嵌入式笔记

2022-11-13 14:35:46 3207

原创 golang make file

golang makefile

2022-10-30 10:54:37 184

原创 ubuntu20 源

163 源

2022-09-04 11:34:20 1075

原创 golang 切片、DeepEqual

切片:动态数组,底层也是数组切片的结构type slice struct { array unsafe.Pointer //一个指向数组的指针 len int //当前容量 cap int //最大容量} var a []string var b = []string{} c := []string{} d := new([]string) e := make([]string, 0)说明address== nilreflect.Deep

2022-05-24 21:49:53 399

原创 nginx转发

nginx 转发配置 location ^~/api/{ proxy_pass http://127.0.0.1:8888/; } location / { root /home/project/web/dist/; try_files $uri $uri/index.html; }

2021-10-30 09:34:49 849

原创 minio部署

docker run -p 9000:9000 -p 19000:9001 --name minio -d --restart=always -e "MINIO_ACCESS_KEY=admin" -e "MINIO_SECRET_KEY=密码" -v /home/docker/minio/data:/data -v /home/docker/minio/config:/root/.minio -v /etc/localtime:/etc/localtime minio/minio:RELEASE.2021

2021-10-09 17:50:14 128

原创 api.http

httpclient 测试文件POST http://localhost:80/v1/api/User/LoginContent-Type: application/json{ "Type": 0, "Username": "admin", "Password": "abcd1234"}> {% client.global.set("auth_token", response.body.Data.Token); client.global.set("host", "l

2021-06-17 11:53:12 250

原创 golang、mysql、proto3数据类型对照表

goproto3mysqlfloat64doubledouble precisionfloat32floatdouble precisionint32int32integerint64int64bigintuint32uint32integer unsigneduint64uint64bigint unsignedint32sint32integerint64sint64bigintuint32fix...

2021-04-30 09:19:01 2114 1

原创 brew install postgresql

Installing dependencies for postgresql@12: krb5==> Installing postgresql@12 dependency: krb5==> Pouring krb5-1.19.1.big_sur.bottle.tar.gz==> Caveatskrb5 is keg-only, which means it was not symlinked into /usr/local,because macOS already prov.

2021-04-28 00:13:58 377

原创 brew install kafka

a@ademacbook-pro Homebrew % brew install kafka==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/openjdk-15.0.2.big_sur.bottle.tar.gz######################################################################## 100.0%==> Downloading h

2021-04-28 00:08:28 461

原创 brew install elastic

==> Tapping elastic/tapCloning into ‘/usr/local/Homebrew/Library/Taps/elastic/homebrew-tap’…remote: Enumerating objects: 870, done.remote: Counting objects: 100% (111/111), done.remote: Compressing objects: 100% (84/84), done.remote: Total 870 (del

2021-04-27 23:52:30 167

原创 test django

django-admin startproject projectpython3 manage.py runserver python3 manage.py startapp app# 创建表python manage.py migrate#运行 python manage.py makemigrations 为模型的改变生成迁移文件python manage.py makemigrations#运行 python manage.py migrate 来应用数据库迁移。pyt.

2021-03-27 18:54:49 78

原创 brew install aircrack-ng

brew install aircrack-ng==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/openssl%401.1-1.1.1j.big_sur.bottle.tar.gz######################################################################## 100.0%==> Downloading https://m

2021-03-05 22:25:04 760

原创 brew install postgresql

a@adeMacBook-Pro ~ % brew install postgresql==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/krb5-1.18.3.big_sur.bottle.1.tar.gzAlready downloaded: /Users/a/Library/Caches/Homebrew/downloads/d0fbca49cdc0e1cac7a03693d2e4a4

2021-01-27 16:27:54 371

原创 brew install podman

a@a ~ % brew install podmanUpdating Homebrew...==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/podman-2.1.1.catalina.bottle.tar.gzAlready downloaded: /Users/a/Library/Caches/Homebrew/downloads/4e7a280fe6d5b21a4de5cd0fdba4

2021-01-23 12:36:55 290

原创 brew install postgresql

~ brew install postgresqlUpdating Homebrew...==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/krb5-1.18.2.mojave.bottle.tar.gz==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/postgresql-12.4.

2020-09-10 19:10:53 1308

原创 brew install gbd

brew install gdbUpdating Homebrew...==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/gdbm-1.18.1_1.mojave.bottle.tar.gzAlready downloaded: /Users/a/Library/Caches/Homebrew/downloads/9540a17eca08c96556d5f50097a166e449f1002.

2020-09-01 17:54:17 765

原创 hyperledger-fabric v2.2 环境搭建

环境搭建0-0下载源码git clone https://github.com/hyperledger/fabric.git这里使用的是2.2的版本,需要进行checkout安装 docker搭建过程中执行的脚本会需要下载镜像If you are using Docker for Mac, you will need to use a location under /Users, /Volumes, /private, or /tmp. To use a different lo

2020-08-18 12:42:04 2116 1

原创 etcd sh

etcdctletcdctl is a command line client for etcd.It can be used in scripts or for administrators to explore an etcd cluster.Getting etcdctlThe latest release is available as a binary at Github along with etcd.etcdctl can also be built from source usin

2020-07-31 09:34:55 214

原创 test chan

func TestChan(t *testing.T) { // 20200728 runtime.GOMAXPROCS(4) ints := make(chan int, 1) go func() { tt := time.NewTicker(time.Second / 1) defer func() { if err := recover(); err != nil { t.Log("recover err :", err) return } }() .

2020-07-28 18:38:46 151

原创 test go web socket

server.gopackage mainimport ( "github.com/labstack/echo/v4" "golang.org/x/net/websocket")func main() { //20200727 e := echo.New() e.GET("/ws", func(c echo.Context) error { handler := websocket.Handler(func(conn *websocket.Conn) { readString

2020-07-27 11:09:44 164

原创 brew install llvm

~ $ brew install llvm==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/libffi-3.3.mojave.bottle.tar.gz######################################################################## 100.0%==> Downloading https://mirrors.aliyun.

2020-06-22 17:50:24 1382

原创 array和slice

类型长度引用扩容优劣array固定长度参数传递时直接copy一份不支持不会影响其他的数据消耗内存slice长度不固定在原有的array上修改,相关的都会收到影响容量小于1024则*2,大于1024 *1.25节省内存容易操作失误,出现莫名的问题空切片和 nil 切片的区别在于,空切片指向的地址不是nil,指向的是一个内存地址,但是它没有分配任何内存空间,即底层元素包含0个元素。nil 切片被用在很多标准库和内置函数中,描述一个不存在的切片的时...

2020-06-20 09:55:52 215

原创 并发压测遇到的问题

问题socket too many open files进程打开一个文件 ,但是现在进程打开的句柄已经达到了上限,已经无法打开了查看进程 open filelsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more查看 open files 配置ulimit -a #查看当前的修改open file 配置ulimit -n ...

2020-04-30 19:02:44 433

原创 记:查询接口查询缓慢

今天接到一个查询接口缓慢的bug无从下手那就从头开始分析1、查看代码是否有问题使用pprof,进行代码占用cpu、memory分析2、查看数据库状态mongostat 查看索引命中次数等参数db.servereStatus() 查看数据库状态3、查看超时的数据库日志修改数据库的配置,将耗时超过100ms的查询打印出来4、分析查询语句explain 来分析语句是否有优化空间查...

2020-04-29 23:49:33 844

原创 brew install gdb

~ $ brew install gdbUpdating Homebrew...==> Installing dependencies for gdb: [email protected] and [email protected]==> Installing gdb dependency: [email protected]==> Downloading https://mirrors.cloud.tenc...

2020-04-25 23:41:16 347

原创 Mongo

ACID- Atomic 原子性- Consistent 一致性- Isolated 隔离性- Durable 持久性CAP- 一致性- 可用性- 容错性在任何时间点,一个分布式系统都只能满足上面三个保障中的两个BASE- 基本可用- 软状态- 最终一致性NRW : 描述最终一致性模型在NoSQL 数据库中的实现- N 数据库已经保留的数据副本数量- R 是在...

2020-04-20 23:08:44 156

原创 pprof

介绍pprof 用来监控、分析性能的可以查看allocs: A sampling of all past memory allocationsblock: Stack traces that led to blocking on synchronization primitivescmdline: The command line invocation of the current pr...

2020-04-07 20:36:14 984

原创 demo_cobra

介绍命令行工具安装go get -v github.com/spf13/cobra/cobra 生成cobra init liu --pkg-name=会生成一个cmd文件夹 root.go 、mian.go添加一个命令cobra add versioin生成的之后的文件目录测试go build ./liu version # 调用刚添加的 命令使用k...

2020-04-07 19:18:26 156

原创 brew install opencv

brew install opencv==> cmakeEmacs Lisp files have been installed to: /usr/local/share/emacs/site-lisp/cmake==> openblasopenblas is keg-only, which means it was not symlinked into /usr/loca...

2020-04-03 16:46:00 1213

原创 TCP、UDP、CoAP、LwM2M、MQTT简单对比

参考https://iot.51cto.com/art/202002/610997.htm目前市面上大多数IoT模组都支持TCP、UDP、CoAP、LwM2M、MQTT等协议,这里面既有传输层的协议也有应用层的协议,协议众多,适用的场景也不同。但是设计产品时通常只需要运用一种协议,那么怎么来选择一种符合自己产品的应用场景的协议显得尤为重要。本文将介绍TCP、UDP、CoAP、LwM2M、M...

2020-03-13 08:39:29 8476

原创 goproxy

https://mirrors.aliyun.com/goproxy/,https://mirrors.cloud.tencent.com/go/,https://goproxy.cn,https://goproxy.io,direct

2020-03-10 17:39:15 762

原创 go tool 命令参数

2020-02-21 11:37:59 1144

原创 govendor 操作

go依赖管理-govendorGolang 官方并没有推荐最佳的包管理方案。到了1.5版本时代,官方引入包管理的设计,加了 vendor 目录来支持本地包管理依赖。官方 wiki 推荐了多种支持这种特性的包管理工具,如:Godep、gv、gvt、glide、govendor等。  govendor该工具将项目依赖的外部包拷贝到项目下的 vendor 目录下,并通过 vendor.json 文件...

2020-01-17 09:48:59 275

原创 [log]openssl证书问题

基本概念TLS:传输层安全协议 Transport Layer Security的缩写SSL:安全套接字层 Secure Socket Layer的缩写TLS与SSL对于不是专业搞安全的开发人员来讲,可以认为是差不多的,这二者是并列关系KEY 通常指私钥。CSR 是Certificate Signing Request的缩写,即证书签名请求,这不是证书,可以简单理解成公钥,生成证书时要把...

2019-11-27 13:59:28 295

原创 Java相关文章

虚拟机https://www.cnblogs.com/lishun1005/p/6019678.html

2019-11-25 22:05:54 157

原创 brew install

brew install helmUpdating Homebrew...==> Downloading https://homebrew.bintray.com/bottles/helm-3.0.0.mojave.bottle.tar.gz######################################################################## ...

2019-11-17 09:41:16 631

原创 区块链模型架构

分为6层:数据层、网络层、共识层、激励层、合约层、应用层数据层描述区块链技术的物理形式,数据块、链式结构、时间戳、哈希函数、Merkle树、非对称加密网络层本质上是一个P2P网络每个节点即接受信息,也产生信息,节点通过维护一个共同的区块链来保持通信每个节点都可以创造新的区块,然后广播通知其他节点,验证通后,新区块就可以被添加到主链上了共识层让高度分散的节点在去中心化的系统中高效...

2019-10-30 13:48:30 754

javase8虚拟机结构

pc寄存器,虚拟机栈,方法区,堆,运行常量池。。。。。。。

2018-07-25

docker从入门到精通-入门篇

docker 最基础的材料,入门环境的搭建,带步骤,docker 最基础的材料,入门环境的搭建,带步骤

2018-03-28

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除