Skip to content

Instantly share code, notes, and snippets.

View tsaiid's full-sized avatar

I-Ta Tsai tsaiid

View GitHub Profile
@Appletone
Appletone / 新新同文堂 bookmarklet
Last active June 19, 2019 02:32
新新同文堂.js
javascript:(function()%7Bvar%20s=document.getElementById(%22tongwenlet_tw%22);if(s!=null)%7Bdocument.body.removeChild(s);%7Dvar%20s=document.createElement(%22script%22);s.language=%22javascript%22;s.type=%22text/javascript%22;s.src=%22https://raw.githubusercontent.com/stargazer8tw/samples/fe8d4f5d89aebff0359b7f3ea52e141a1d92dcf5/tongwen_bookmarklet/js/bookmarklet_tw.js%22;s.id=%22tongwenlet_tw%22;document.body.appendChild(s);%20%7D)();
; WinHttpRequest.ahk
; https://gist.github.com/tmplinshi/a74c7f0cc7f1510ce0ad
; v1.06 (2018-07-12) - 增加默认 User-Agent
; v1.05 (2017-09-07) - 增加 DetectCharset 选项
; v1.04 (2017-08-29) - 增加自动使用响应头的编码
; v1.03 (2016-01-18) - 增加“加载 gzip.dll 失败”提示,防止忘记复制 gzip.dll 到脚本目录。
; v1.02 (2015-12-26) - 修复在 XP 系统中解压 gzip 数据失败的问题。
; v1.01 (2015-12-07)
/*
@clchiou
clchiou / non_graceful_shutdown.py
Created March 19, 2015 04:32
Python ThreadPoolExecutor (non-)graceful shutdown
#!/usr/bin/env python3
import concurrent.futures.thread
import sys
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
def remove_file(path):
print('Removing file %s' % path)
; WinHttpRequest.ahk
;
; Usage is similar to HTTPRequest (by VxE),
; Please visit the HTTPRequest page (http://goo.gl/CcnNOY) for more details.
;
; Supported Options:
; NO_AUTO_REDIRECT
; Timeout: <Seconds>
; Proxy: <IP:Port>
; Codepage: <CPnnn> - e.g. "Codepage: 65001"
@larrybolt
larrybolt / cf-ddns.sh
Last active September 11, 2023 17:09
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh