摘要: 一、创建一个exp文件,例如 vim remote.exp #!/usr/bin/expect # 登录跳板机 spawn ssh -g -A -p [lindex $argv 0] [lindex $argv 1]@[lindex $argv 2] expect { "*Opt>*" {send 阅读全文
posted @ 2021-12-10 18:15 nickchou 阅读(2332) 评论(0) 推荐(0) 编辑
摘要: 一、安装brew 官方安装 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 如果官方安装失败的话,使用国内源安装(安装完后需要重启下终端) /bin/z 阅读全文
posted @ 2021-12-10 14:12 nickchou 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1、检查是否已经安装 rpm -qa |grep samba 2、安装 yum -y install samba 3、配置samba 修改之前先备份下 cp /etc/samba/smb.conf /etc/samba/smb.back.conf vim /etc/samba/smb.conf 配置 阅读全文
posted @ 2021-12-09 18:40 nickchou 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 做了一个gin的扩展,想把请求参数里的内容自动传到方法参数里,需要用到反射,但是反射有个缺点是无法拿到参数名(注意:不是函数名) 做的以下测试。 测试代码如下 package main import ( "go/ast" "go/parser" "go/token" "log" ) func mai 阅读全文
posted @ 2021-10-18 15:07 nickchou 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 一、安装certbob 官网地址 https://certbot.eff.org/ ,安装方法参考官方推荐步骤 官方推荐通过snap来安装,https://snapcraft.io/docs/installing-snap-on-centos 二、安装nginx+ssl https://www.cn 阅读全文
posted @ 2021-08-18 19:02 nickchou 阅读(681) 评论(0) 推荐(0) 编辑
摘要: 配置参考 配置如下,说明参考注释 server { gzip on; # 是否开启gzip gzip_buffers 32 4K; # 缓冲(压缩在内存中缓冲几块? 每块多大?) gzip_comp_level 6; # 推荐6压缩级别(级别越高,压的越小,越浪费CPU计算资源) gzip_min_ 阅读全文
posted @ 2021-04-06 11:07 nickchou 阅读(297) 评论(0) 推荐(0) 编辑
摘要: Nacos是阿里开源的一个统一配置/注册中心的开源软件。 官网:https://nacos.io/ 代码:https://github.com/alibaba/nacos 阿里云官网有一个现成版本可以免安装直接用*(缺点:每个空间限制200个key)* https://acmnext.console 阅读全文
posted @ 2021-03-26 17:06 nickchou 阅读(3185) 评论(0) 推荐(0) 编辑
摘要: 准备工作:安装docker、安装mysql(创建好数据库等) 一、拉镜像 镜像版本查看:https://hub.docker.com/_/wordpress?tab=tags&page=1&ordering=last_updated docker pull wordpress:latest 二、运行 阅读全文
posted @ 2021-02-22 17:21 nickchou 阅读(2855) 评论(0) 推荐(0) 编辑
摘要: Gopher抱怨最多的三大问题如下: 包依赖管理 go1.11开始有好转 缺少泛型 规划实现中,预计在1.18的版本 错误处理 个人感觉还是不太理想 下载链接:https://golang.google.cn/dl/ 主要版本 发布时间 release notes 主要功能 go1.10 2018. 阅读全文
posted @ 2021-02-22 11:53 nickchou 阅读(2380) 评论(0) 推荐(0) 编辑
摘要: 发送工作通知的文档:https://developers.dingtalk.com/document/app/asynchronous-sending-of-enterprise-session-messages 备注:开发者未认证也可以用 一、创建应用 1.1 打开 https://open-de 阅读全文
posted @ 2021-02-18 15:24 nickchou 阅读(968) 评论(0) 推荐(0) 编辑