This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | |
<title>街景地图</title> | |
<style type="text/css"> | |
*{ | |
margin:0px; | |
padding:0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
def base62_encode(num, alphabet=ALPHABET): | |
"""Encode a number in Base X | |
`num`: The number to encode | |
`alphabet`: The alphabet to use for encoding | |
""" | |
if (num == 0): | |
return alphabet[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pushbullet($title,$body) | |
{ | |
$apikey='v1dFWupd5ifoOz0tajOc'; | |
$device_iden='ujEH7v8iCkedjz'; | |
$req_args = array( | |
'headers' => array( | |
'Authorization' => 'Basic ' . base64_encode( $apikey.':') | |
), | |
'timeout' => 50, | |
'sslverify' =>FALSE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#!/usr/bin/env python | |
import os | |
import sae | |
import web | |
import json | |
import urllib2 | |
urls=('/','Index','/xiami/(.+)','Xiami') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import simplejson | |
file_object = open('./export.json') | |
try: | |
all_the_text = file_object.read() | |
finally: | |
file_object.close() | |
emails=simplejson.loads(all_the_text) | |
old_emails = emails.values()[1] | |
mails = [] | |
for dict in old_emails: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($host ~* ^(.*)\.nju\.pt\/^(*)) { | |
set $sub_name $1; | |
set $path $2; | |
rewrite ^(.*) http://$sub_name.njupt.edu.cn$path permanent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(".") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(0); | |
set_time_limit(0); | |
header('Content-type:text/html; charset=utf-8'); | |
if(!$_GET['username']||!$_GET['password']||!$_GET['domain']){ | |
exit(json_encode(array('msg'=>'username,password,domain 参数必选'))); | |
} | |
$domain = explode("@", $_GET['domain']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#允许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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var base="http://winysky.com/usr/themes/NewPath/"; | |
var core = document.createElement('script'); | |
core.type = 'text/javascript'; core.async = true; | |
core.src = 'https://gist.github.com/ccbikai/5802471/raw/42ad24c950425b2f7d2ee258629258976518e3a9/base.js'; | |
var s = document.getElementsByTagName('head')[0]; | |
s.appendChild(core); | |
var bgimg = [ | |
"http://pic.winysky.com/content/uploads/bg/0.jpg", | |
"http://pic.winysky.com/content/uploads/bg/1.jpg", | |
"http://pic.winysky.com/content/uploads/bg/2.jpg", |