打字時暫時停用 touchpad .syndaemon -i 1 -d
ref: this
[+/-] |
Disabling the Touchpad Temporarily While Typing |
[+/-] |
Network manager & reslov.conf |
防止 network manager 每次開機後修改 /etc/reslov.conf, 一個 dirty 的方法, 加上 immutable 的屬性:sudo chattr +i /etc/reslov.conf
如果要修改 reslov.conf, 先將 immutable 的屬性拿掉:sudo chattr -i /etc/reslov.conf
[+/-] |
colorful log via perl |
cat /var/log/message | perl -pe 's/ERROR/\e[1;31;43m$&\e[0m/g'
[+/-] |
proxy via iptables |
#!/bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
proxy_host=x.x.x.x
proxy_port=8080
iptables -F
iptables -F -t nat
iptables -t nat -A OUTPUT -p tcp -d 127.0.0.0/8 -j ACCEPT
iptables -t nat -A OUTPUT -p tcp -d 10.0.0.0/8 -j ACCEPT
iptables -t nat -A OUTPUT -p tcp -d 172.16.0.0/16 -j ACCEPT
iptables -t nat -A OUTPUT -p tcp -d 172.19.0.0/16 -j ACCEPT
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination
"$proxy_host":"$proxy_port"