Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

zsnmwy

💭
I may be slow to respond.
Block or report user

Report or block zsnmwy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zsnmwy
zsnmwy / add CA cert on CentOS Debian Ubuntu.md
Last active Jun 20, 2019 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS, Debian or Ubuntu
View add CA cert on CentOS Debian Ubuntu.md
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org
@zsnmwy
zsnmwy / gist:0a767e1c4617f3c3913e4ff3cd5eaeef
Last active May 28, 2019
vue循环输出图片-对象
View gist:0a767e1c4617f3c3913e4ff3cd5eaeef
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
View gist:1298de72b45425c6e4bcc904bd1ff0fc
先装这个
https://www.microsoft.com/zh-cn/download/details.aspx?id=53344
再装
https://www.microsoft.com/zh-cn/download/details.aspx?id=53323
再装
https://go.microsoft.com/fwlink/?linkid=839523
View bbr.sh
#检测安装完成或失败
judge(){
if [[ $? -eq 0 ]];then
echo -e "${OK} ${GreenBG} $1 完成 ${Font}"
sleep 1
else
echo -e "${Error} ${RedBG} $1 失败${Font}"
exit 1
fi
}
@zsnmwy
zsnmwy / Get_files_day_of_week.sh
Last active Oct 10, 2018
Use stat and date to get the file day of week
View Get_files_day_of_week.sh
function Get_files_day_of_week() {
date -d $(stat "${1}" | grep Acc | grep -v '/' | awk '{print $2}' | sed 's/-//g') +%w
}
@zsnmwy
zsnmwy / crontab.sh
Created Sep 16, 2018
create a crontab job through shell script
View crontab.sh
(crontab -l 2>/dev/null; echo "*/5 * * * * /path/to/job -with args") | crontab -
@zsnmwy
zsnmwy / use nvm insatll node && npm install pm2 .sh
Last active Sep 16, 2018
use nvm insatll node && npm install pm2
View use nvm insatll node && npm install pm2 .sh
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash 1>/dev/null #This install nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 8.11.1 # This install node v8.11.1
nvm use 8.11.1
node -v # Show node version
You can’t perform that action at this time.