Skip to content

Instantly share code, notes, and snippets.

View tzwm's full-sized avatar
☠️
……

Samwise Wang tzwm

☠️
……
  • nieta
  • Latent Space
  • 10:22 (UTC +08:00)
  • X @tzwm
View GitHub Profile
@flackou
flackou / mysql2_wait_timeout.rb
Created December 23, 2011 13:04
Testing mysql2 wait_timeout param
require 'rubygems'
gem 'mysql2'
gem 'activerecord', '3.1.1'
require 'active_record'
# http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout
MYSQL_WAIT_TIMEOUT_MAX = 2147483
# Testing the remote db connection after a 60s sleep
def test_connection(extra_conf = {})
@chuangbo
chuangbo / README.md
Last active February 18, 2025 07:30
Python dynamic DNSPod DNS Script

替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获取 API Token 的方式

获得 domain_id 可以用 curl

curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`