Skip to content

Instantly share code, notes, and snippets.

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

TypingCooperX liyaodong

🏠
Working from home
View GitHub Profile

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

@liyaodong
liyaodong / js:page.js start
Created December 11, 2014 03:34
js:page.js start
$(function(){
if(!$('body').hasClass('yourclass')) {
return false;
}
})
@liyaodong
liyaodong / gist:caa2c1ac6e706f81cb00
Last active August 29, 2015 14:12
「Geek每日一题」2014.12.30
Come on !
@liyaodong
liyaodong / 「Geek每日一题」2014.12.31
Last active August 29, 2015 14:12
「Geek每日一题」2014.12.31
这道题答案很多,主要考察最优算法。
@liyaodong
liyaodong / gist:dda1c7fcd3ada30ae3fd
Last active August 29, 2015 14:13
一个简单的物料计算器
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>网页算料器</title>
<style type="text/css">
body {
margin: 0; padding: 0;
}
.wrap {
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, monospace, Arial;
font-size: 10pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;
width: 100%; left: 0;
@liyaodong
liyaodong / gist:4240f6f16c3e4bee0f27
Created January 14, 2015 02:43
python模拟post脚本
#!/usr/bin/python
#coding=utf-8
import urllib
import urllib2
import random
def post(url, data):
req = urllib2.Request(url)
data = urllib.urlencode(data)
@liyaodong
liyaodong / article2pic-remotestyle
Last active August 29, 2015 14:16
article2pic插件远程样式
[
{"selector":".article-title","value":"font-size: 12em;"},
{"selector":".article-date","value":"balabala"}
]
@liyaodong
liyaodong / rails_guard
Created March 9, 2015 01:19
Rails_guard
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|scss|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
end
@liyaodong
liyaodong / gist:a6b90656cf3e7b309b2b
Last active August 29, 2015 14:17
ruby-layouts
doctype html
html lang="en"
head
title
| balabala....
link rel="shortcut icon" href="/favicon.ico"
meta charset='utf-8'
meta name="renderer" content="webkit"
meta http-equiv="X-UA-Compatible" content="IE=edge"
meta content='initial-scale=1.0,maximum-scale=1.0,width=device-width' name='viewport' /