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 / data-markdown.user.js
Created January 22, 2012 17:25 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@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,