Skip to content

Instantly share code, notes, and snippets.

View apm's full-sized avatar

Adam Moore apm

  • Medic Alert Foundation
  • San Francisco
View GitHub Profile
@paulrouget
paulrouget / scratchpad.js
Created November 2, 2012 17:59
Floating scrollbars in Firefox
/**
* How to have floating scrollbars in Firefox (Linux, Windows & Mac).
* Screenshot: http://i.imgur.com/bn44L.png
* You need Firefox > 18. Just run this code in a browser-scratchpad:
*
* Ping me on Twitter (@paulrouget) if you run into problems.
*
* 1. Go to about:config - Set devtools.chrome.enabled to true
* 2. Starts Scratchpad (Shift-F4)
* 3. In Scratchpad's menubar, check "Environment > Browser"
@davglass
davglass / expand.js
Created May 2, 2012 20:48
Resolve module meta-data (including gallery) in Node.js with YUI's Loader
#!/usr/bin/env node
var Y = require('yui/io-base'),
//API call to gallery's API
url = 'http://yuilibrary.com/gallery/api/all',
//What module should we resolve?
mod = process.argv[2] || 'gallery-aui-calendar',
//Hack up the JSON from the API into Loader Meta-Data
hack = function(str) {
var json = {};
var temp;
if (typeof YUI != 'undefined') {
temp = YUI;
YUI = undefined;
}
loadJS('bagger-yui', 'http://yui.yahooapis.com/combo?3.1.1/build/yui/yui-min.js', false);
// now wait for YUI to load
var waitForYUIJS = setInterval(function() {