Skip to content

Instantly share code, notes, and snippets.

@toaotc
toaotc / keybase.md
Last active September 26, 2017 11:55
keybase.md

Keybase proof

I hereby claim:

  • I am toaotc on github.
  • I am toaotc (https://keybase.io/toaotc) on keybase.
  • I have a public key ASAzEvOXkaROuYN1UNRabvFumorWVe9MNt3WMKOH_UZT_Qo

To claim this, I am signing this object:

@toaotc
toaotc / jquery.scoreboard.js
Created August 16, 2011 09:29 — forked from anonymous/jquery.scoreboard.js
jQuery scoreboard plugin
(function($) {
$.fn.scoreboard = function(config) {
config = $.extend({}, $.fn.scoreboard.defaults, config);
config.chars = config.chars.split('');
var charcode_map = {};
$.each(config.chars, function(i, el) {
charcode_map[el] = i;
});
@toaotc
toaotc / jquery.src.js
Created August 16, 2011 09:23 — forked from anonymous/jquery.src.js
jQuery src loading plugin
(function($) {
$.fn.src = function(uri, callback) {
return this.each(function() {
var $this = $(this);
$this.attr('src', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==');
$this.one('load', callback);
$this.attr('src', uri);
})
}
})(jQuery);