Skip to content

Instantly share code, notes, and snippets.

View wyattdanger's full-sized avatar

Stephen Bush wyattdanger

View GitHub Profile
This is the source for my blog.
#unbind C-b
set-option -g prefix C-w
bind-key C-w last-window
set -g base-index 1
set-option -g default-terminal "screen-256color"
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
/* Before Big Poppa */
if ( $('ul.tabs').size() ) {
// do stuff
}
if ( $('a[href^=http]').size() ) {
// do stuff
}
@wyattdanger
wyattdanger / poppa-on-node.js
Created August 22, 2011 20:08
Poppa on specific node
$('header').poppa({
'li': function (li) {
// $('header').find('li')
// is accessible within this function as li
},
'a:first-of-type': function (a) {
// $('header').find('a:first-of-type')
// is accessible within this function as a
}
});
@wyattdanger
wyattdanger / poppa-on-coffee.coffee
Created August 22, 2011 20:29
big poppa on coffee
$.poppa
'a[href^=http]': ( a ) ->
# do cool stuff with a
'ul.tabs': ( ul ) ->
# do cool stuff with ul
'#fancy-page': ( page ) ->
# do fancy stuff on page
@for $i from 0 through 8
h2.spinner-#{$i}
background-position: 0px $i*400px
(function() {
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
$(function() {
var Map, NomsApp, infoBox, nom, textBox;
if (!navigator.geolocation) {
alert('bro you need geolocation');
}
textBox = $('#text');
infoBox = $("#infoBox");
Map = (function() {
/*
* Simple Pub/Sub Implementation for jQuery
*
* Inspired by work from Peter Higgins (https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js)
*
* This is about the simplest way to write a pubsub JavaScript implementation for use with jQuery.
*/
(function($) {
// Cache of all topics
@wyattdanger
wyattdanger / config.ru
Created December 15, 2011 16:10
basic
class App
def call(env)
[
200,
{'Content-Type' => 'text/html'},
[ env['PATH_INFO'] ]
]
end
end
#unbind C-b
set-option -g prefix C-w
bind-key C-w last-window
set -g base-index 1
set-option -g default-terminal "screen-256color"
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D