Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
View gist:3692265
// 支持自定义命名空间
Do.setConfig('namespace', 'Ark');
// 利用 `Do` 自身的 `add` 来定义模块的方法名
Do.add('cookie', { path: 'cookie.js' });
Do.add('ajax', { path: 'ajax.js', requires:['cookie'] });
Do('ajax', function() {; // Using ajax with cookie mod.
dmitry / backbone-mixin.js
Created Oct 1, 2011 — forked from wesen/backbone-mixin.js
Merge backbone views (mixin pattern)
View backbone-mixin.js
* ## Merging mixin views in backbone.js ##
* really just more a test for tumblr gistr
* Merge the mixin (a Backbone.View) into another Backbone.View. Automatically merge events, defaults, and call the parent initializer.
function mergeMixin(view, mixin) {
xPaw / steam_quick_queue.user.js
Last active Jul 6, 2022
This script has been integrated into SteamDB browser extension!
View steam_quick_queue.user.js
// ==UserScript==
// @name Steam Queue Auto Discoverer
// @description Discover the Steam queue three times to get the sale cards
// @version 2.3.0
// @namespace
// @icon
// @match*
// @grant none
// ==/UserScript==
View CSS for <sup> and <sub>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
josevalim /
Last active Aug 9, 2022
A 1LOC bash script for re-running tests whenever a lib/ or test/ file changes keeping the same VM instance
# You will need fswatch installed (available in homebrew and friends)
# The command below will run tests and wait until fswatch writes something.
# The --stale flag will only run stale entries, it requires Elixir v1.3.
fswatch lib/ test/ | mix test --stale --listen-on-stdin