代码改变世界

随笔分类 -  系统运维

golang strings.Split函数

2021-09-28 08:58 by jetwill, 422 阅读, 收藏, 编辑
摘要: golang strings.Split函数 https://play.studygolang.com/ package main import ( "fmt" "strings" ) func main() { email := "abc@a.com" emailS := strings.Spli 阅读全文

Launch agent by connecting it to the master

2021-09-27 17:20 by jetwill, 176 阅读, 收藏, 编辑
摘要: Jenkins Node 是 Windows, Jenkins Server 在 Linux C:\JenkinsAgent\start_jenkins_agent.bat java -DSoftKillWaitSeconds=0 -Djava.lang.string.substring.nocop 阅读全文

使用srvany.exe把程序安装成windows服务的方法

2021-09-27 16:13 by jetwill, 106 阅读, 收藏, 编辑
摘要: http://mazhihui.iteye.com/blog/1294431 https://www.cnblogs.com/liuqiyun/p/9897396.html srvany.exe是什么? srvany.exe是Microsoft Windows Resource Kits工具集的一个 阅读全文

区别对待 .gz 文件 和 .tar.gz 文件

2021-09-22 17:47 by jetwill, 65 阅读, 收藏, 编辑
摘要: #检测 tar tvf xxx.tar.gz #解压 tar zxvf #检测 gunzip -tv yyy.gz #解压 gunzip yyy.gz 阅读全文

go 使用 sort 对切片进行排序

2021-09-20 10:20 by jetwill, 809 阅读, 收藏, 编辑
摘要: golang对slice的排序 golang里面需要使用sort包,并且实现几个接口Len, Swap, Less sort 包排序demo 假如现在有个slice 叫做 ids 里面保存的数据类型是int32 package main import ( "fmt" "sort" ) type In 阅读全文

Go数组遍历与排序

2021-09-19 17:51 by jetwill, 2786 阅读, 收藏, 编辑
摘要: 遍历数组 Go遍历数组有两种方式 1.按照数组下标进行遍历 2.用range遍历 package main import ( "fmt" ) func main() { // 声明数组 array := [...]string{"red", "yellow", "blue"} // 方法一:直接用数 阅读全文

通过脚本升级PowerShell

2021-09-18 09:05 by jetwill, 102 阅读, 收藏, 编辑
摘要: Update Powershell through command line https://superuser.com/questions/1287032/update-powershell-through-command-line Run this command : iex "& { $(ir 阅读全文

How to run a batch file each time the computer loads Windows

2021-09-11 10:48 by jetwill, 38 阅读, 收藏, 编辑
摘要: https://www.computerhope.com/issues/ch000322.htm#:~:text=Press%20Start%2C%20type%20Run%2C%20and%20press%20Enter.%20In,folder.%20Create%20a%20shortcut% 阅读全文

go.mod file not found in current directory or any parent directory; see 'go help modules'

2021-09-07 08:08 by jetwill, 1814 阅读, 收藏, 编辑
摘要: go的环境设置问题,执行 go env -w GO111MODULE=auto 我的环境:Windows 7, Go 1.17 D:\Apps\GOPATH\src\code.oldboyedu.com\studygo>cd day01 D:\Apps\GOPATH\src\code.oldboye 阅读全文

xshell 所选的用户密钥未在远程主机上注册;无法加载密钥

2021-09-05 10:17 by jetwill, 5900 阅读, 收藏, 编辑
摘要: 他山之石 https://zhuanlan.zhihu.com/p/92528287 安全起见,服务器最近的安全策略准备进行更改,逐渐由原来的密码登录更换为密钥登录认证。 于是今天把服务器上的id_rsa导入到了xshell的【用户密钥】里面,在更改登录方式后,很欢快的点击【连接】,然而死活登不上服 阅读全文

win10右键添加在此处打开powershell

2021-08-25 17:21 by jetwill, 150 阅读, 收藏, 编辑
摘要: https://www.cnblogs.com/simuhunluo/p/8057029.html 你想要的效果可能就是这个吧?但是找了好久没有找到方法?哈哈,大家都一样,实际上,不需要修改任何东西, 解锁新知识: 在文件夹空白处,按住Shift同时鼠标右击,发现没??发现没!!!! 补充2019- 阅读全文

powershell操作excel

2021-08-20 09:03 by jetwill, 1788 阅读, 收藏, 编辑
摘要: https://blog.csdn.net/u010288731/article/details/83120205 如何创建一个Excel 应用程序对象? $xl = new-object -comobject excel.application 默认创建的Excel 应用程序对象是在后台的,它默认 阅读全文

不用find,怎样递归地给目录设置700,给文件设置600权限?

2021-08-18 09:36 by jetwill, 111 阅读, 收藏, 编辑
摘要: https://stackoverflow.com/questions/36553701/how-to-set-permissions-recursively-700-for-folders-and-600-for-files-without-u I'm trying to figure out a 阅读全文

Windows Batch 编程 和 Powershell 编程

2021-07-29 10:05 by jetwill, 101 阅读, 收藏, 编辑
摘要: Batch Script - Functions with Return Values https://www.tutorialspoint.com/batch_script/batch_script_functions_with_return_values.htm How can I check 阅读全文

如何在 CentOS 上安装 dos2unix 和 unix2dos 命令

2021-07-18 17:17 by jetwill, 1008 阅读, 收藏, 编辑
摘要: yum install -y dos2unix 注意:以上安装包既包含 dos2unix 命令,又包含 unix2dos 命令。 阅读全文

下面哪些命令可以查看file1文件的第300-500行的内容?

2021-07-11 16:34 by jetwill, 2272 阅读, 收藏, 编辑
摘要: 下面哪些命令可以查看file1文件的第300-500行的内容? cat file1 | tail -n +300 | head -n 200 cat file1| head -n 500 | tail -n +300 sed -n '300,500p' file1 答案:BC 解释: >head - 阅读全文

Autosys 快速参考

2021-06-15 14:36 by jetwill, 1000 阅读, 收藏, 编辑
摘要: Autosys Quick Reference Introduction to Autosys: AutoSys is an automated job control system for scheduling, monitoring, and reporting. These jobs can 阅读全文

JSch Algorithm negotiation fail

2021-06-02 09:35 by jetwill, 214 阅读, 收藏, 编辑
摘要: https://stackoverflow.com/questions/30846076/jsch-algorithm-negotiation-fail As you can see, the server offers these ciphers: INFO: kex: server: aes25 阅读全文

从一堆 JAR 文件中,找出一个 Java class 文件的所在配置

2021-05-31 18:00 by jetwill, 74 阅读, 收藏, 编辑
摘要: Find a class somewhere inside dozens of JAR files? find path/to/libs -name '*.jar' -exec grep -Hls ClassName {} \; $ find . -name '*.jar' -exec grep - 阅读全文