Skip to content

Instantly share code, notes, and snippets.

View wrumsby's full-sized avatar
💭
what is this even

Walter Rumsby wrumsby

💭
what is this even
View GitHub Profile
@rgrove
rgrove / node-scroll-info.js
Created June 6, 2012 21:35
node-scroll-info.js
/*!
Copyright (c) 2012 Ryan Grove. All rights reserved.
Redistribution and use of this software in source and binary forms, with or
without modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
@pamelafox
pamelafox / phonegap.html
Created October 20, 2011 23:05
PhoneGap Timing Template
<!doctype html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" />
<title>PhoneGap App</title>
<script>
var timedEvents = [];
function timeEvent(name) {
timedEvents.push({'name': name || 'unnamed', time: Date.now()});
}
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@nzakas
nzakas / gist:1119343
Created August 2, 2011 00:38
Autofocus shim
<!-- autofocus shim for older browsers that doesn't impact newer ones -->
<input type="text" name="q" id="q" autofocus>
<script>
(function(textbox){
if (textbox.autofocus !== true){
textbox.focus();
}
})(document.getElementById("q"));
</script>
@cowboy
cowboy / HEY-YOU.md
Last active July 16, 2025 03:49
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
(function() {
var gs = document.createElement('script'), gsc = document.createElement('div'), interval;
gs.type = 'text/javascript'; gs.async = true; gsc.id = 'getsatisfaction';
gs.src = document.location.protocol + '//s3.amazonaws.com/getsatisfaction.com/javascripts/feedback-v2.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gs);
(document.getElementsByTagName('body')[0]).appendChild(gsc);
interval = setInterval(function() {
if (window.GSFN !== undefined) {
new GSFN.feedback_widget({
@apm
apm / xinstanceyui3.html
Created July 24, 2009 22:50
Using custom events to pass data between YUI3 instances.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YUI3 cross instance communication</title>
<script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-debug.js" type="text/javascript"></script>
<body>
<form name="form1">
<input id="button1" type="button" value="Click!" />
</form>