Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
Have fun!

Zack Wu izackwu

🌴
Have fun!
View GitHub Profile
@izackwu
izackwu / Adblock Plus Filter Rules
Last active Jul 15, 2022
Better Caixin Weekly | 更好的财新周刊网页版阅读体验
View Adblock Plus Filter Rules
weekly.caixin.com##.xiangguan
weekly.caixin.com##.f_ri
weekly.caixin.com##.weixinmedia
weekly.caixin.com##.rssBox
weekly.caixin.com##.funcri01
weekly.caixin.com##.fenxiangRig
weekly.caixin.com##.conri
weekly.caixin.com##.fenghui_code
weekly.caixin.com##.multimedia
weekly.caixin.com##.copyright
View keybase.md

Keybase proof

I hereby claim:

  • I am izackwu on github.
  • I am zackwu (https://keybase.io/zackwu) on keybase.
  • I have a public key whose fingerprint is A728 FF5A 25FE 01F2 8B28 A44F 8036 957A 3C29 20ED

To claim this, I am signing this object:

@izackwu
izackwu / Caddyfile
Last active Jan 5, 2021
Docker compose: Miniflux + RSSHub + Caddy
View Caddyfile
{
email hi@imwzk.com
}
reader.imwzk.com {
encode zstd gzip
reverse_proxy miniflux:8080
}
rsshub.imwzk.com {
@izackwu
izackwu / 📊 Weekly development breakdown
Last active Oct 29, 2020
📊 Weekly development breakdown
View 📊 Weekly development breakdown
TeX 1 hr 9 mins █████████████████████ 100.0%
XML 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.0%
@izackwu
izackwu / encoding_converter.py
Created Feb 26, 2020
Convet a file to UTF-8 encoding automatically with Python
View encoding_converter.py
import chardet
import sys
def convert_to_utf8(raw_content, encoding=None):
encoding = encoding or chardet.detect(raw_content)["encoding"]
try:
return raw_content.decode(encoding)
except UnicodeDecodeError:
print("\tFailed to decode with {} encoding".format(encoding))