2014/05/24 02:44
#!/bin/bash
if [ $UID -ne 0 ]; then
sudo $0 $*
exit
fi
# Clear default rules
iptables -F
iptables -X
iptables -Z
# Default policy for INPUT
iptables -P INPUT DROP
# Accept for loopback
iptables -A INPUT -i lo -j ACCEPT
# Allow ssh, http
iptables -A INPUT -p tcp --dport 22 -j ACCEPT …
Continue reading »
2014/05/19 13:20
我寫了一個script去parse這個東西....
一開始是這麼寫的
# -*- coding: utf-8 -*-
import requests, re
urls = """http://www.shute.kh.edu.tw/~t1248/voc7000-AB.htm
http://www.shute.kh.edu.tw/~t1248/voc 7000 - CD.htm
http://www.shute.kh.edu.tw/~t1248/voc7000- EF.htm
http://www.shute.kh.edu.tw/~t1248/voc 7000 - GHIJ.htm …
Continue reading »
2014/05/15 13:46
Config
Default Editor For sudoedit
sudo update-alternatives --config editor
Static IP
sudoedit /etc/network/interfaces
auto eth0
iface eth0 inet static
address <address>
netmask <mask>
network <network>
broadcast <broadcast>
gateway <gateway>
dns-nameservers 8.8.8.8
Problems
sendmail was slow
edit /etc/hosts
127.0.0.1 localhost localhost.localdomain …
Continue reading »
2014/05/11 09:28
Routing Bug
我從blogger匯入文章,但是custom url內有.
的出現,結果就噴Error 404
解決方法
http://logdown.com/account/posts/198288-what-is-reset.css/edit
http://logdown.com/account/posts/198288/edit
進入編輯後,把dot拿掉即可

大量刪除分類
吐嘈:POST轉頁超慢的,我剛剛從亂七八糟的blogger搬家過來,刪categories刪到吐血
// ==UserScript==
// @name ajax-delete-categories
// @namespace logdown.com
// @include http://logdown.com/account/blogs/inndy/categories
// @include https://logdown.com/account …
Continue reading »