This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* F.A.Q */ | |
div { position: relative; } | |
input[type=checkbox] { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
opacity: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
** Client side - /public/src/app.js | |
*/ | |
var myApp = { | |
// Collections | |
Collections: { | |
list: Backbone.Collection.extend() | |
}, | |
// Views |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! ****************************** | |
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("===================="); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bootstrap | |
PX.app = new PX.App(); | |
Backbone.history.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var importio = require('import-io').client, | |
fs = require('fs'), | |
sha1 = require('sha1'), | |
http = require('http-get'); | |
// importio configuration | |
var userGuid = 'YOUR_USER_GUID'; | |
var apiKey = 'YOUR_API_KEY'; | |
var io = new importio(userGuid, | |
apiKey, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint strict:false*/ | |
/*global CasperError console phantom require*/ | |
/** | |
* grab links and push them into xml | |
*/ | |
var casper = require("casper").create({ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var system = require('system'); | |
if (system.args.length < 5) { | |
console.info("You need to pass in account name, username, password, and path to casperJS as arguments to this code."); | |
phantom.exit(); | |
} | |
var account = system.args[1]; | |
var username = system.args[2]; | |
var password = system.args[3]; |
OlderNewer