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
/** | |
* Author: Vincent Tin | |
* Date: 13-2-1 | |
* Time: 上午11:43 | |
*/ | |
(function (window, document, $,_){ | |
/** | |
* 用于处理拓词发音的封装包,其中ToVoice只能实例化一次,使用requireJs直接返回实例化对象 | |
*/ |
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 | |
import urllib2, urllib, re, cookielib | |
def CCNUAuth(su_id=None, su_psw=None): | |
""" | |
根据学号和密码获取姓名,失败返回false | |
:param su_id: |
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 | |
__author__ = 'Vincent Ting' | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Vincent Ting' | |
import cookielib | |
import urllib2 |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Vincent Ting' | |
import urllib2, urllib, re, cookielib | |
def CCNUAuth(su_id=None, su_psw=None, get_name=False): | |
""" | |
根据学号和密码获取姓名、性别、宿舍号,失败返回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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Vincent Ting' | |
import cookielib | |
import urllib2 | |
import urllib | |
import re | |
import random |
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(lang="zh-CN") | |
head | |
meta(charset="utf-8") | |
title Hello World | |
meta(name="keywords", content="") | |
meta(name="description", content="") | |
meta(name="viewport", content="width=device-width") | |
link(rel="stylesheet", href="/static/css/style.css") | |
script(type="text/javascript", src="/static/js/common.js") |
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
Array.prototype.del = function (index) { | |
for (var i = index - 1; i < this.length; i++) { | |
this[i] = this[i] + 1; | |
} | |
this.length -= 1; | |
return this; | |
}; |
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
$('textarea').bind('input', function() { | |
$('.msg').html($(this).val().length + ' characters'); | |
}); | |
if($('textarea')[0].attachEvent){ | |
$('textarea')[0].attachEvent('onpropertychange', function(ev){ | |
if(ev.propertyName.toLowerCase() === 'value') { | |
$('textarea').trigger('input') | |
} | |
}) | |
} |
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() { | |
console.time('test'); | |
var noop = function() { | |
}; | |
var strParse = function(str, cur_statements, cur_vars) { | |
cur_vars = cur_vars || []; | |
cur_statements = cur_statements || []; |
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
require 'resolv' | |
require 'net/smtp' | |
require 'dkim' | |
Dkim::domain = 'domain.com' | |
Dkim::selector = 'mail' | |
Dkim::private_key = <<DKIM_KEY | |
-----BEGIN RSA PRIVATE KEY----- | |
Your Private Key Here. | |
-----END RSA PRIVATE KEY----- |
OlderNewer