Skip to content

Instantly share code, notes, and snippets.

View koy1619's full-sized avatar
🎯
Focusing

Chris koy1619

🎯
Focusing
View GitHub Profile
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
@koy1619
koy1619 / pypod.py
Last active December 17, 2015 13:29 — forked from chuangbo/README.md
python脚本实现dnspod的ddns
#!/usr/bin/env python
#-*- coding:utf-8 -*-
#替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
#获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"
#获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"
import httplib, urllib
import socket
import time
@koy1619
koy1619 / ddns.go
Last active December 17, 2015 12:39 — forked from hugozhu/ddns.go
go实现dnspod的ddns
package main
import (
"io/ioutil"
"log"
"net"
"net/http"
"net/url"
"strings"
"time"