git常用操作记录
配置文件查看 GIT 本地配置1git config --list 编辑 git 配置文件1git config --global --edit 设置 GIT 用户信息12git config --global user.name "zhanglikun"git config --global user.email "iuxt@qq.com" git 记住密码1git config --global credential.helper store 配置文件 ~/.gitconfig 内容12345[user] name = zhanglikun email = iuxt@qq.com[credential] helper = store 忽略追踪文件权限 建议 windows 代码使用 1git config core.filemode false 分支管理 命令 作用 git branch -a 查看所有分支 git branch -r 查看远程分支 git...
树莓派常用操作记录
安装 Docker替换成清华源 清华源地址https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/ 123echo "deb [arch=armhf] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \ $(lsb_release -cs) stable" | \ sudo tee /etc/apt/sources.list.d/docker.list 12sudo apt-get updatesudo apt-get install docker-ce 替换软件源中科大源https://mirrors.ustc.edu.cn/help/raspbian.html清华源https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/
VMware Workstation常用操作记录
安装官方下载链接12345678910111213141516171819202122232425262728293031323334353637383940414243444546https://download3.vmware.com/software/wkst/file/VMware-workstation-full-10.0.7-2844087.exe 上面的版本不支持64位Windows系统 https://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.0.0-2985596.exehttps://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.5.4-5192485.exehttps://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.5.5-5234757.exe...
Windows搜索工具everything
无法弹出移动硬盘?设置👉🏻️索引👉🏻️NTFS 和 REFS取消勾选 自动包含新增固定卷 排除搜索结果设置👉🏻️索引👉🏻️排除列表👉🏻️添加筛选器 1234$RECYCLE.BIN*AppData\Roaming\Microsoft\Windows\Recent**Windows\Prefetch**AppData\Local\Packages\Microsoft.Windows.Search_* 直接修改配置文件需要将 everything 进程完全停止后才能进行修改,不然 everything 关闭的时候会覆盖手动修改的配置文件。 退出 everything 停止 everything 服务 1net stop everything 配置文件地址:%appdata%\Everything\Everything.ini...
Ubuntu_Charmed_Kubernetes
官方文档: https://ubuntu.com/kubernetes/docs 开始之前集群 ip 规划,所有机器系统都是 ubuntu 20.04 hostname ip juju-client 10.0.0.10 juju-controller-1 10.0.0.11 juju-master-1 10.0.0.21 juju-master-2 10.0.0.22 juju-master-3 10.0.0.23 juju-worker-1 10.0.0.31 juju-worker-2 10.0.0.32 juju-client 为 juju 客户端和 haproxy 机器juju-controller-1 为 juju 控制器节点 (可以做高可用) 以下操作都是在 juju-client 上执行 安装 juju1sudo snap install juju --classic 设置云类型12juju add-cloud输入manual 添加机器 (一共 5 台)12juju bootstrapjuju...
搭建网关服务器
网关服务器的常见用途:1.企业局域网想要访问外网,可以使用网关服务器上网2.可以一个网卡连接公网,一个网卡连接局域网交换机,让网关服务器做路由器使用 Windows 平台外网适配器打开共享打开 控制面板\网络和 Internet\网络连接右键外网网卡, 属性, 共享 允许其他用户通过此计算机的 Internet 连接来连接 注意: 外网打开允许其他用户连接后,内网的 IP 地址会自动改变,这时候得手动修改一下内网适配器的 IP 地址. 内网机器设置 内网机器网关配置成 网关服务器 的内网 IP 注意:内网适配器的固定 IP 不要填写网关,否则会导致路由混乱. Liunx 服务端 (用 firewalld) 多网卡机器做网关做 nat 转发, 局域网其他机器需要配置网关地址. 开启内核转发 123sudo vim /etc/sysctl.conf---net.ipv4.ip_forward = 1 立即生效 1sudo sysctl -p 开启 NAT 转发 12firewall-cmd --permanent --zone=public...
Windows系统隐藏文件
attrib 命令 这个只是隐藏, 并没有把文件加密 1attrib +S +H <文件或文件夹> 优点: 不用加密解密, 访问简单 缺点: 不安全 创建 vhd 并使用 bitlocker在磁盘管理里面创建 vhd 磁盘, 挂在好后使用 BitLocker 加密 (可选) 优点: 数据安全,没有密码无法解密 缺点: 容易损坏,造成数据全部丢失 使用第三方加密软件略 使用压缩软件加密略
Windows使用命令操作进程
查找进程1tasklist | findstr xxx 根据进程名杀进程1taskkill /F /IM npc.exe 根据进程 PID 杀进程1TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
Windows隐藏cmd运行窗口
使用开源软件实现 (推荐) hidecon.exe 官网地址 使用方法,将 hidecon.exe 和其他可执行放在一块,在 bat 脚本前面加上 12hidecon.exenpc -server=xxx:8888 -vkey=xxxxxxxxxxxxxxxx -type=tcp 使用 vbs 实现(推荐)1CreateObject("WScript.Shell").Run "D:\syncthing\syncthing.exe",0 或者批量运行: 1234Set ws = CreateObject("Wscript.Shell")ws.run "cmd /c start 1.exe",vbhidews.run "cmd /c start 2.exe",vbhidews.run "cmd /c start 3.exe",vbhide 复制保存成 vbs 文件即可。 使用 cmd 实现(会有一闪而过的黑窗)12345@echo offif...
Linux常用命令之awk
awk 多个分隔符12echo "abcdefg" | awk -F '[ce]' '{print $1,$2,$3}'ab d fg 但是我想要提取 dmesg 里面的时间,想以 [] 来做分割,这个时候可以反写 [] 取个巧 1dmesg | awk -F '[][]' '{print $2}' 打印某一列为特定值的行1awk '$8=="500"' nginx_access.log awk 交换一个文件的两列比如文件 test.txt 1234a;b;cd;e;f1;2;34;5;6 方法 11awk -F ';' '{printf("%s;%s;%s\n",$3,$2,$1)}' test.txt 方法 2123awk -F ';' '{temp = $3 ;...