Skip to content

Instantly share code, notes, and snippets.

Dan Webb danwrong

Block or report user

Report or block danwrong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:908968
function amdResolve(id, mod) {
var parts ='/'); parts.pop();
var dir = parts.join('/');
return id.replace(/^\./, dir);
function amdMap(args, mod) {
var mapped = [];
function require(id) {
View json_dependency.js
function JsonFile(path) {
this.path = path;
JsonFile.prototype = new loadrunner.Dependency;
JsonFile.prototype.start = function() {
var me = this;
$.get(this.path, function(data) {
View gist:904225
(function() {
var intentRegex = /twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,
windowOptions = 'scrollbars=yes,resizable=yes,toolbar=no,location=yes',
width = 550,
height = 420,
winHeight = screen.height,
winWidth = screen.width;
function handleIntent(e) {
e = e || window.event;
View s.js
function Sequence(deps) {
this.deps = deps;
Sequence.prototype = new Dependency;
Sequence.prototype.start = function() {
var me = this, nextDep = 0, allResults = [];
(function next() {
var dep = me.deps[nextDep++];
if (dep) {
View akamai.rb
require 'akamai'
module Build
class Akamai
class << self
def configure(username, password)
::Akamai.configure do |c|
c.cachecontrol_username = username
c.cachecontrol_password = password
View gist:855588
provide('base', function(exports) {
using('jquery', underscore', 'mustache', function(jq, u, m) {
$: jquery,
u: u,
mustache: mustache
View loadrunner.js
(function loadrunner(e){var w=e.document;var h=w.getElementsByTagName("script"),n,k;var B={},j={},v;for(var z=0,r;r=h[z];z++){if(r.src.match(/loadrunner\.js(\?|#|$)/)){n=r;break}}function c(i){if(i.length>0){return i.replace(/\/$/,"")+"/"}return""}function o(i){return}function b(s,E){for(var F=0,G;G=s[F];F++){if(E==G){return F}}return -1}function t(i){return !!i.match(/^(([a-zA-Z0-9\-_]+)\/)*[a-zA-Z0-9\-_]+$/)}function q(i){return[c(y.path),i,".js"].join("")}function d(i){if(i.match(/^(https?)?:?\/\//)){return i}if(i.match(/^\/[^\/]/)){return c(y.docRoot)+i}if(i.match(/^\$/)){return c(y.path)+i.replace(/^\$/,"")}return i}function p(s){var i;if(i=j[s]){return i}else{return s}}function f(){}f.prototype.addCallback=function(i){if(this.completed){i.apply(this,this.results)}else{this.callbacks=this.callbacks||[];this.callbacks.push(i)}};f.prototype.complete=function(){if(!this.completed){this.results=o(arguments);this.completed=true;if(this.callbacks){for(var E=0,s;s=this.callbacks[E]
View exhibit A.js
var args= "";
for(var i=0;i<argument_pairs.length;i++) {
args+= argument_pairs[i][0];
args+= "="
args+= argument_pairs[i][1];
if( i < argument_pairs.length-1 ) args+= "&";
return args;
View gist:596165
About to start a silent teatime demo. Follow @danwrong if you want to play along.
R E T W E E T if you've got a beer in hand!
"Extraordinary is taking a simple idea and revolutionizing it in a way that changes the world."
Surely that deserves a favorite!!
Have any questions? DM me.
View gist:473487
function DropDownMenu(element) {
element.addEventListener('mouseover mouseout', this, false);
DropDownMenu.prototype = {
handleEvent: function(e) {
switch(e.type) {
'mouseover':; break;
'mouseout': this.close(e); break;
You can’t perform that action at this time.