Skip to content

Instantly share code, notes, and snippets.

View xdays's full-sized avatar
🏠
Working from home

xdays

🏠
Working from home
View GitHub Profile
@xdays
xdays / zabbix_web.conf
Created November 20, 2013 15:24
apache cofigure file for zabbix
#
# Zabbix monitoring system php web frontend
#
Alias /zabbix /usr/local/zabbix-web
<Directory "/usr/local/zabbix-web">
Options FollowSymLinks
AllowOverride None
Order allow,deny
@xdays
xdays / mail.md
Last active December 28, 2015 18:19
two method to specify the sender with mail
@xdays
xdays / pypod.md
Last active December 27, 2015 03:59 — forked from chuangbo/README.md

替换上你的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"

20130626

@xdays
xdays / github_card.html
Last active December 25, 2015 12:19
github card
<div class="github-card" data-user="xdays" data-width="300" data-height="150"></div>
<script src="http://lab.lepture.com/github-cards/widget.js"></script>
@xdays
xdays / python_cookies.py
Last active December 15, 2015 15:19
a basket of python tips
#input and raw_input
def input(prompt):
return (eval(raw_input(prompt)))
#convert one-dimensional list to dictionary
dict(enumerate(list))
#bidict one-to-one mapping data structure
b = bidict(dict)
b[key]