Skip to content

Instantly share code, notes, and snippets.

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

Ding Yi dingyi

🏠
Working from home
View GitHub Profile
@dingyi
dingyi / gist:1584007
Created January 9, 2012 17:27 — forked from joefiorini/gist:1511971
Backbone + Stripe = AWESOME
class Stripe.TokenRequest extends Backbone.Model
validate: (attrs)->
error =
if !attrs.name
attribute: "name"
message: "Please enter your name"
else if !attrs.email
attribute: "email"
message: "Invalid email"
else if !Stripe.validateCardNumber(attrs.number)
@dingyi
dingyi / autoproxy.js
Created November 5, 2011 05:10 — forked from sofish/autoproxy.js
何必加密
/*
* 何必加密,=,=
* 把 decode64() 这个函数的最后一句,“return _3 改成 console.log(_3)”
* 在任何支持 console.log() 的浏览器运行一下,就看出“真正”的源码。
* 何必加密,真是浪费资源
*/
function decode64(_1) {
var _2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var _3 = "";
/* `XHTML, HTML4, HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
acronym,
address,
applet,
article,
aside,