View eternal-ff.txt
@BKcore | |
@codylindley | |
@KerbalSpaceP | |
@GilbertWehrle | |
@dlctbl | |
@FREE_FACTS | |
@tabatkins | |
@marijnjh | |
@rocket2guns | |
@stripe |
View parseurl.js
/* | |
ParseURL by James Padolsey: http://james.padolsey.com/javascript/parsing-urls-with-the-dom/ | |
*/ | |
// This function creates a new anchor element and uses location | |
// properties (inherent) to get the desired URL data. Some String | |
// operations are used (to normalize results across browsers). | |
function parseURL(url) { | |
var a = document.createElement('a'); |
View index.html
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Mini slider</title> | |
<link rel="stylesheet" href="mini-slider.css"> | |
</head> | |
<body> | |
<div id="slider"> | |
<!-- The previous button is inserted here --> |
View anchor-select.js
(function(window) { | |
function getSelector(hash) { | |
var matches; | |
hash = hash.slice(1); | |
matches = hash.match(/^anchor-select\((.+)\)$/); | |
if (matches) { | |
return decodeURIComponent(matches[1]); | |
} | |
return false; |
View gist:2603011
var obj = { | |
foo: 1, | |
bar: 2 | |
}; | |
Object.prototype.oops = function(){}; | |
// Meh. | |
for (var key in obj) { | |
if (obj.hasOwnProperty(key)) { |
View documentup-bookmarklet.js
// javascript:(function(){var%20w%20=%20window,h%20=%20w.location.host,p%20=%20w.location.pathname,r%20=%20p.match(/^(\/[^\/]+\/[^\/]+)/),gh%20=%20%27github.com%27,du%20=%20%27documentup.com%27;if%20(r%20&&%20h%20==%20gh)%20{w.location%20=%20%27http://%27%20+%20du%20+%20r[1];}%20else%20if%20(r%20&&%20h%20==%20du)%20{w.location%20=%20%27https://%27%20+%20gh%20+%20r[1];}})(); | |
(function(){ | |
var w = window, | |
h = w.location.host, | |
p = w.location.pathname, | |
r = p.match(/^(\/[^\/]+\/[^\/]+)/), | |
gh = 'github.com', | |
du = 'documentup.com'; | |
if (r && h == gh) { |
View mini-lightbox.js
/* A small script to display lightboxes. No IE6 support. */ | |
/*global jQuery: false*/ | |
(function($, window){ | |
"use strict"; | |
$.miniLightbox = {}; | |
var EVENT_NS = 'minilightbox'; | |
var DEFAULT_SETTINGS = { | |
'class': '', |
View Makefile
# JS files | |
JS_FINAL = js/project-name-all.js | |
JS_TARGETS = js/file1.js \ | |
js/file2.js \ | |
js/file3.js | |
# CSS files | |
CSS_FINAL = css/project-name-all.css | |
STYLUS_TARGETS = css/file1.styl \ |
View Makefile
# | |
# css/js minification/compression makefile | |
# | |
# | |
# JS_TARGETS -- js files to minify/gzip | |
# CSS_TARGETS -- css files to minify/gzip | |
# CLEANUP -- additional files to delete during "make clean" | |
# |
View _init-routes.js
// Use it with jQuery history: http://tkyk.github.com/jquery-history-plugin/ | |
// Hashes should begin with #!/ (see hash.slice(2) below) | |
(function($) { | |
$.history.initRoutes = function (routes) { | |
$(function() { | |
$.history.init(function(hash) { | |
hash = hash.slice(2); | |
var routeFound = false; | |
for (var rpath in routes) { | |
if (routes.hasOwnProperty(rpath)) { |