Skip to content

Instantly share code, notes, and snippets.

View parkerproject's full-sized avatar

Parker parkerproject

View GitHub Profile
@parkerproject
parkerproject / dabblet.css
Created December 22, 2011 14:53
Checkbox Hack
/* Checkbox Hack */
input[type=checkbox] {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
-webkit-appearance: push-button;
-moz-appearance: button;
/* F.A.Q */
div { position: relative; }
input[type=checkbox] {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
@parkerproject
parkerproject / anchor.css
Created March 3, 2012 19:46
css: displaying anchor as a block
a{display: block;}
@parkerproject
parkerproject / path.js
Created October 31, 2012 20:13
path for world map
This file has been truncated, but you can view the full file.
var rsr = Raphael('rsr', '2528.5721', '1428.3294');
var ocean = rsr.path("M 2079.5058,1457.5605 L 615.24779,1457.5605 C 615.13079,1457.5605 615.07079,1457.5535 614.95179,1457.5215 C 611.67679,1456.6515 608.40179,1455.7815 605.12779,1454.9105 C 599.15079,1453.3225 593.22879,1451.5225 587.30779,1449.7385 C 564.39379,1442.8315 541.76579,1434.6995 519.46979,1426.0115 C 495.81079,1416.7935 472.34979,1407.0946 449.19179,1396.6816 C 426.78379,1386.6056 405.17679,1375.0536 383.76379,1363.0356 C 363.11779,1351.4496 343.01079,1338.8296 323.37979,1325.5996 C 302.29179,1311.3876 281.47879,1296.8506 261.05379,1281.7006 C 242.35079,1267.8276 223.73679,1253.6306 206.05279,1238.4686 C 186.98679,1222.1216 167.82379,1205.7706 150.35279,1187.6906 C 132.97779,1169.7106 116.33279,1151.0606 100.15679,1131.9976 C 84.352777,1113.3736 70.086776,1093.4716 56.901786,1072.9246 C 44.046786,1052.8916 32.093776,1032.1356 22.469776,1010.3426 C 17.516776,999.12756 12.408776,987.76556 8.7017761,976.06056 C 5.0657761,964.58166 1.5997761,953.0
@parkerproject
parkerproject / app.js
Created December 12, 2012 20:35 — forked from bryanwillis1/app.js
Back bone server JS
/*
** Client side - /public/src/app.js
*/
var myApp = {
// Collections
Collections: {
list: Backbone.Collection.extend()
},
// Views
@parkerproject
parkerproject / getElementsByClassName
Created July 30, 2013 04:01
getElementsByClassName function
function getElementsByClassName(node,classname) {
if (node.getElementsByClassName) { // use native implementation if available
return node.getElementsByClassName(classname);
} else {
return (function getElementsByClass(searchClass,node) {
if ( node === null )
node = document;
var classElements = [],
els = node.getElementsByTagName("*"),
elsLen = els.length,
// Is the passed CSS property supported?
// eg. detectCSS('transition')
function detectCSS(prop){
var
prop = prop.replace(/-(\w)/g,function(s,g){return g.toUpperCase()}),
pre = ',Icab,Khtml,Moz,Ms,O,Webkit'.split(',');
for (var i = 0; i < pre.length; ++i){
if(i==1)
prop = prop.slice(0,1).toUpperCase() + prop.slice(1);
// JS Module Pattern:
// http://j.mp/module-pattern
// Redefine: $, window, document, undefined.
var APP = (function($, window, document, undefined) {
// Automatically calls all functions in APP.init
$(document).ready(function() {
APP.go();
});
h2 Hello World
h3 Hello World
:markdown
This is some **test** markdown text
we can even link to [stuff](http://google.com)
ul.list
- each i in data
li=i.name
/*! ******************************
Handlebars helpers
*******************************/
// debug helper
// usage: {{debug}} or {{debug someValue}}
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/)
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");