Skip to content

Instantly share code, notes, and snippets.

View nay-kang's full-sized avatar
🏠
Working from home

nay-kang

🏠
Working from home
View GitHub Profile
@VADemon
VADemon / string-replace.lua
Last active January 29, 2025 09:10
Plain-text string.replace for Lua (string.gsub without patterns)
-- USAGE:
-- string.replace("mystring", "my", "our")
-- or
-- local teststr = "weird[]str%ing"
-- teststr2 = teststr:replace("weird[]", "cool(%1)")
-- Warning: add your own \0 char handling if you need it!
do
local function regexEscape(str)
@onlytiancai
onlytiancai / import_zone.py
Created June 21, 2013 07:56
从zonefile文件把域名记录导入到DNSPod
# -*- coding: utf-8 -*-
'''
功能:
从zonefile文件导入域名到Dnspod
requirements:
dnspython==1.10.0
requests==1.0.4
'''