Skip to content

Instantly share code, notes, and snippets.

View fanzeyi's full-sized avatar

Zeyi (Rice) Fan fanzeyi

View GitHub Profile
?>
<!-- 恩哼 前面同学没有闭合标签哦 -->
@fanzeyi
fanzeyi / gist:630816
Created October 17, 2010 12:41
OpenFetion Error
[20:39:15] ***ERROR*** Send a message to (SIP-C/4.0 280 Send SMS OK
T: sip:XXXXXXXX@fetion.com.cn;p=2538
I: 5
Q: 2 M
L: 114
D: Sun, 17 Oct 2010 12:43:05 GMT
XI: A067861FBFA94519BD92D92C2111472F
<results><quota-frequency><frequency name="send-sms" day-count="2" month-count="5"/> </quota-frequency></results>)`s mobile phone failed
@fanzeyi
fanzeyi / HOSTS
Created October 29, 2010 13:17
hosts
#Dropbox
174.36.30.71 api.dropbox.com
174.129.7.52 pi-content.dropbox.com
174.36.30.90 www.dropbox.com
75.101.129.115 dl.dropbox.com
75.101.159.151 dl-web.dropbox.com
174.36.30.70 linux.dropbox.com
#Twitter
128.242.240.29 twitter.com
#include <stdio.h>
int main()
{
return 0;
}
function relative_time(time_value) {
var values = time_value.split(" ");
time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3];
var parsed_date = Date.parse(time_value);
var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
delta = delta + (relative_to.getTimezoneOffset() * 60);
if (delta < 60) {
return 'less than a minute ago';
@fanzeyi
fanzeyi / BN_add.c
Created November 10, 2010 14:43
高精度加法 来自openssl包
​​int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
{
const BIGNUM *tmp;
int a_neg = a->neg, ret;
bn_check_top(a);
bn_check_top(b);
/* a + b a+b
* a + -b a-b
@fanzeyi
fanzeyi / short.py
Created December 12, 2010 05:09
演示
from shorturl.services.bit_ly import *
a = bit_ly('http://www.fanhe.org/')
a.init_api('','')
print a.GetShortUrl()
@fanzeyi
fanzeyi / gist:738079
Created December 12, 2010 14:31
fanfou
a {
text-decoration:none!important;
}
#columns{
-webkit-box-shadow:0 0 20px black;
-webkit-border-radius:10px;
}
#main{
@fanzeyi
fanzeyi / .vimrc
Created December 25, 2010 09:24
vim配置文件
" VIM配置文件
" Author: Fanzeyi (fanzeyi1994[at]gmail.com)
" Last Modified Date: 2010-10-13 17:49
" 设置语言及编码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set enc=utf-8
" set fencs=utf-8,ucs-bom,gbk,gb18030,shift-jis,gb2312,cp936
*{
font-family:"文泉驿微米黑" !important;
}
a {
text-decoration:none!important;
}
#columns{
-webkit-box-shadow:0 0 20px black;