Skip to content

Instantly share code, notes, and snippets.

View zh-h's full-sized avatar

zonghua zh-h

  • Shen Zhen, China
View GitHub Profile
sudo systemctl stop firewalld.service
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F
chkconfig iptables off
sudo service iptables off
sudo service iptables stop
sudo apt-get purge netfilter-persistent
sudo apt autoremove
@zh-h
zh-h / switch.bat
Created March 31, 2019 13:56
Auto switch display on Windows started
@rem Please put this file to C:\Users\%USER%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
choice /t 1 /d y /n
DisplaySwitch.exe /extend
choice /t 1 /d y /n
DisplaySwitch.exe /external
@zh-h
zh-h / who-weibo.js
Last active February 27, 2021 19:00
是谁发的微博微博图片
function decodeBase62(number) {
var alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var out = 0
var len = number.length - 1
for (var t = 0; t <= len; t++) {
out = out + alphabet.indexOf(number.substr(t, 1)) * Math.pow(62, len - t)
}
return out
}