Skip to content

Instantly share code, notes, and snippets.

Avatar

zenxds zenxds

View GitHub Profile
View mobile.css
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
/* PC宽屏样式*/
/* iPad及以下,所有小于(不等于)960宽度的平板电脑*/
@media only screen and (max-width: 959px) {}
/* 仅iPad竖版,所有小于(不等于)960宽度的平板电脑的竖版*/
@media only screen and (min-width: 768px) and (max-width: 959px) {}
/* iPhone及以下*/
@media only screen and (max-width: 767px) {}
/* 仅iPhone横版,包括某些平板电脑的竖版*/
View font.css
/* PC */
body { font-family: tahoma, arial, "Hiragino Sans GB", \5b8b\4f53; }
/* mobile */
body { font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif; }
/* pad */
boyd { font-family: "DIN-Medium", "FZLanTingHeiS-R-GB", "Open Sans", "Helvetica Neue", Arial, "Hiragino Sans GB";}
View holiday.js
/**
* 开始时间,结束时间
* isOnlyWorkDay 工作时间是否只计算工作日
* 婚假这些周六周日都算进去的 事假这些就不算周末
*/
(function() {
var MILLISECONDS_OF_MINUTE = 60 * 1000;
var MILLISECONDS_OF_DAY = 24 * 60 * MILLISECONDS_OF_MINUTE;
View 打点.js
function log(url, callback) {
// 防止请求被垃圾回收
var image = new Image(),
id = "_tbtx_" + Math.random();
window[id] = image;
image.onload = image.onerror = function() {
window[id] = null;
if (callback) {
callback();
View resizeImageMap.js
define("resizeImageMap", ["jquery"], function($) {
var $window = $(window);
var dataAttr = "data-src";
$.fn.resizeImageMap = function() {
var $images = $(this);
var resizeImageMap = function() {
$images.each(function() {
View timezone.py
# django中 timezone.now()使用的还是utc的时间,而非TIME_ZONE设置的时区的时间
timezone.localtime(timezone.now())
View .vimrc
"""""""""""""""""""""""""""""""""""""""
" Basic
"""""""""""""""""""""""""""""""""""""""
" close vi compatible
set nocompatible
" can use backspace and delete in insert mod
set backspace=indent,eol,start
View 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"

You can’t perform that action at this time.