Discover gists
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
CheddrUtil = new function() { | |
this.globals = { | |
waitForThen: function (things, what) { | |
for (i=0;i<=things.length;i++) { | |
if (typeof eval(things[i]) != 'undefined'){ | |
console.log(things[i] + ' loaded!'); | |
} else { setTimeout('waitForLoadThen("'+ what.toString()+'")', 100); return false; } | |
} | |
return eval(what); | |
}, |
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
// DeepGet | |
let resp = { | |
collection: [ | |
{ | |
name: 'batman', | |
metadata: { | |
rating: 'PG-14', | |
year: 1985 | |
} | |
}, |
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
/**** | |
* Inmediate Function scopes the Application to prevent variable pollution | |
* @param: {Object} global , Reference of the global object | |
* @param: {Obejct} FWK , Custom framework | |
*/ | |
;(function (global, FWK, Node) { | |
'use strict'; | |
// Defining global constants for the app | |
FWK.const('RANGE_MINUTES' , 720); // Range minutes from 0 to 720 |
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
/* | |
* ToyFW | |
* 1.11217.003 | |
*/ | |
module.exports = (function() { | |
var fs = require('fs'), | |
path = require('path'), |
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
// | |
// Graphic Novelist (graphic-novelist.js) | |
// Created by M@ McCray | |
// site: http://mattmccray.com | |
// email: matt at elucidata dot net | |
// | |
// API: | |
// | |
// GraphicNovelist.parse( text ) -> Parse text into array of script Nodes | |
// GraphicNovelist.renderNodes( nodes ) -> Renders array of script Nodes into HTML |
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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<style type="text/css"> | |
tr.had { color: #888; } | |
</style> | |
<script type="text/html" id="beer_row"> | |
<% var d = new Date(obj.updated * 1000); now = new Date(); %> | |
<tr <%= (Beerradar.myRatings.indexOf(parseInt(obj.beer.ratings[0].id)) > -1) ? 'class="had"' : '' %>> | |
<td><%= Math.round((now.getTime() - d.getTime()) / 86400000) %> days</td> |
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
/** | |
* Adapted from the official plugin text.js | |
* | |
* Uses UnderscoreJS micro-templates : http://documentcloud.github.com/underscore/#template | |
* @author Julien Cabanès <julien@zeeagency.com> | |
* @version 0.2 | |
* | |
* @license RequireJS text 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. | |
* Available via the MIT or new BSD license. | |
* see: http://github.com/jrburke/requirejs for details |
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
/** | |
* Allow Prototypal inheritance | |
* http://javascript.crockford.com/prototypal.html | |
* @author Douglas Crockford | |
* @version 2008-04-07 | |
* @param oldObject | |
* @return newObject | |
*/ | |
if (typeof Object.create !== 'function') { | |
Object.create = function (o) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>templator2</title> | |
<style type="text/css"> | |
html, body { | |
font-size: 14px; |
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
/** | |
* Delicious2Diigo | |
* | |
* Author: | |
* Pierre Lindenbaum | |
* http://plindenbaum.blogspot.com | |
* | |
* Motivation: | |
* save bookmarks from delicious to diigo using the Diigo API. | |
* |
NewerOlder