启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
tmux at [-t 会话名]
| find .type f -atime -300 -print -maxdepth 1 -exec rm {} \; |
| function TraversalObject(obj) { | |
| for (var a in obj) { | |
| if (typeof (obj[a]) == "object") { | |
| TraversalObject(obj[a]); //递归遍历 | |
| } else { | |
| var RegUrl = new RegExp(); | |
| RegUrl.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$"); | |
| if (RegUrl.test(obj[a])) { | |
| fileDownload.push(obj[a]); | |
| } |
| var RegUrl = new RegExp(); | |
| RegUrl.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$"); |
| function downloadFile(url) { | |
| var httpClient = url.slice(0,5) === "https"? https:http; | |
| httpClient.get(url,function(response) { | |
| var RegFileName = new RegExp(); | |
| RegFileName.compile(".*%2F(.*?)$"); | |
| var fileName = RegFileName.exec(url)[1]; | |
| console.log(fileName); | |
| if(fileName) { | |
| var writer = fs.createWriteStream(resPath+fileName); |
| #ip转数字 | |
| update tbl_mc_server s set s.`ip`= inet_aton("183.16.194.104") | |
| #数字转ip | |
| select inet_ntoa(ip) from tbl_mc_server |
| var win = nw.Window.get(); | |
| var child_process = require('child_process'); | |
| var path = require('path'); | |
| win.on('close', function() { | |
| child_process.exec(path.dirname(process.execPath)+'\\stop-server.bat'); | |
| win.close(true); | |
| }) |
| #!/bin/bash | |
| #变量定义 | |
| ip_array=("192.168.1.1" "192.168.1.2" "192.168.1.3") | |
| user="test1" | |
| remote_cmd="/home/test/1.sh" | |
| #本地通过ssh执行远程服务器的脚本 | |
| for ip in ${ip_array[*]} |
| #!/bin/bash | |
| #变量定义 | |
| ip_array=("192.168.1.1" "192.168.1.2" "192.168.1.3") | |
| user="test1" | |
| remote_cmd="/home/test/1.sh" | |
| #本地通过ssh执行远程服务器的脚本 | |
| for ip in ${ip_array[*]} |
| var sortedCollection = _.sortBy(collection, function(item){ | |
| return firstArray.indexOf(item.id) | |
| }); |