I hereby claim:
- I am ccbikai on github.
- I am ccbikai (https://keybase.io/ccbikai) on keybase.
- I have a public key ASAayS5EUfE0yo6rmHR6YP6Q-eKmzFZlu8R0s3rW0TQ-NQo
To claim this, I am signing this object:
#允许rpc | |
enable-rpc=true | |
#允许所有来源, web界面跨域权限需要 | |
rpc-allow-origin-all=true | |
#允许非外部访问 | |
rpc-listen-all=true | |
#RPC端口, 仅当默认端口被占用时修改 | |
rpc-listen-port=6800 | |
# 保存日志到文件,没有该文件用 touch 命令新建,不然会报错 | |
log=/mnt/upan/aria2.log |
# -*- coding: utf-8 -*- | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
# unsplash 全站下载脚本 | |
# 请先安装 requests ,BeautifulSoup | |
# pip install requests beautifulsoup4 | |
# 运行 python unsplash.py | |
# 输入最小页数和最大页数 |
I hereby claim:
To claim this, I am signing this object:
function wp_iframe_handler_gist( $matches, $attr, $url, $rawattr ) { | |
$iframe = '<iframe width="100%" height="300" src="https://gist.github.com/'. esc_attr($matches[1]) .'/'. esc_attr($matches[2]) . '.pibb" frameborder=0 ></iframe>'; | |
return apply_filters( 'iframe_gist', $iframe, $matches, $attr, $url, $rawattr ); | |
} | |
wp_embed_register_handler( 'gist_iframe', '#https://gist.github.com/(.*?)/([\w]+)#i', 'wp_iframe_handler_gist' ) |
function pushbullet($title,$body) | |
{ | |
$apikey='v1dFWupd5ifoOz0tajOc'; | |
$device_iden='ujEH7v8iCkedjz'; | |
$req_args = array( | |
'headers' => array( | |
'Authorization' => 'Basic ' . base64_encode( $apikey.':') | |
), | |
'timeout' => 50, | |
'sslverify' =>FALSE, |
# -*- coding: utf-8 -*- | |
#!/usr/bin/env python | |
import os | |
import sae | |
import web | |
import json | |
import urllib2 | |
urls=('/','Index','/xiami/(.+)','Xiami') |
[1,2,3].reduce(function(sequence, i) { | |
return sequence.then(function() { | |
return Promise.resolve(i); | |
}).then(function(j) { | |
console.log(j); | |
}); | |
}, Promise.resolve()); | |
// 从一个完成状态的 Promise 开始 | |
var sequence = Promise.resolve(); |
if ($host ~* ^(.*)\.nju\.pt\/^(*)) { | |
set $sub_name $1; | |
set $path $2; | |
rewrite ^(.*) http://$sub_name.njupt.edu.cn$path permanent; | |
} |
import os | |
def change_suffix(dir_path): | |
for name in os.listdir(dir_path): | |
new_name=name.replace('.markdown','.md') | |
os.rename(name,new_name) | |
change_suffix(".") |
(function(doc, win) { | |
var docEl = doc.documentElement, | |
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', | |
recalc = function() { | |
var clientWidth = docEl.clientWidth; | |
if (!clientWidth) { | |
return | |
}; | |
if (clientWidth >= 640) { |