# 生成备份文件 && 打包为zip && 删除备份文件
sqlcmd -S . -U sa -P 123 -Q "BACKUP DATABASE netnr TO DISK = '/package/data/netnr.bak' with format" && cd /package/data && zip -r netnr.zip netnr.bak && rm -rf netnr.bak
# 注意权限 chown mssql /package/data && chgrp mssql /package/data
# 备份
sqlcmd -S . -U sa -P 密码 -Q "BACKUP DATABASE 数据库 TO DISK = '备份路径' with format"
# cer 转 pfx
openssl pkcs12 -export -out fullchain.pfx -inkey private.key -in fullchain.cer
# p7b 转 crt
openssl pkcs7 -print_certs -in fullchain.p7b -out fullchain.crt
# 分解命令:
pkcs12 # OpenSSL中PKCS#12文件的文件实用程序
-export -out fullchain.pfx # 导出并保存
-inkey private.key # 使用私钥文件作为与证书结合的私钥
# 访问 http://localhost:66/index.html
server {
listen 66;
charset utf-8;
location / {
# 不存在则直接从后台web内容服务器调取
if (!-e $request_filename) {
proxy_pass https://squoosh.app;
}
var links = document.links, i = 0, md = [];
for (var len = links.length; i < len; i++) {
var link = links[i];
md.push("[" + link.innerHTML.replace(/\[/g,'\\[').replace(/\]/g,'\\]') + "](" + link.href + ")");
}
console.log(md.join(' \n'))
last # 登录成功的用户信息
last | less # 最近倒序
lastb # 登录失败的用户信息
# /var/log/ 目录下 secure 开头的日志文件
# 查看哪些IP破解你SSH密码以及次数
cat /var/log/secure | awk '/Failed/{print $(NF-3)}' | sort | uniq -c | awk '{print $2" = "$1;}'
var dld = {
//跨域代理
proxyServer: [
"https://cors.eu.org/",
"https://api.netnr.eu.org/link/",
"https://api.codetabs.com/v1/proxy?quest=",
"https://netnr.zme.ink/api/Open/Proxy?url="
],
proxyIndex: 0,
proxyGet: (link) => {
# 已经有了SS
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
# 取消
git config --global --unset http.proxy
git config --global --unset https.proxy
# 只对github进行代理
systemctl status firewalld # 查看firewall服务状态
systemctl start firewalld # 启动
service firewalld restart # 重启
systemctl stop firewalld # 关闭
systemctl disable firewalld # 开机禁用
systemctl enable firewalld # 开机启用
firewall-cmd --zone=public --permanent ... # 指定区域、永久的命令
firewall-cmd --list-all # 查看防火墙规则