Skip to content

Instantly share code, notes, and snippets.

Avatar

zonghua zh-h

  • Shen Zhen, China
View GitHub Profile
View gist:ffae133368f08cbd0ee5820b2ddfcee1
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 Mar 31, 2019
Auto switch display on Windows started
View switch.bat
@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 Feb 27, 2021
是谁发的微博微博图片
View who-weibo.js
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
}