- a task list item
- list syntax required
- normal formatting, @mentions, #1234 refs
- incomplete
- completed
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
(function(){ | |
var log = console.log; | |
console.log = function(){ | |
var timestamp = '['+new Date().toJSON().slice(14,-1)+']'; | |
if (arguments.length) { | |
if (typeof arguments[0] === "string") { | |
var args = Array.prototype.slice.call(arguments, 0); | |
args[0] = "%s " + arguments[0]; | |
args.splice(1, 0, timestamp); | |
return log.apply(console, args); |
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
function MasterStore() { | |
this.datastore = {}; | |
} | |
MasterStore.prototype.has = function(key, value){ | |
if (value == null) return this.datastore.hasOwnProperty(key); | |
if (Array.isArray(value)) { | |
for (var i = 0; i < value.length; i++) { | |
if (this.datastore[key].indexOf(value[i]) < 0) { | |
return false; |
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 newcap: false */ | |
var B = require("bluebird/js/main/promise")(); | |
var Bproto = B.prototype; | |
var deferredPrototype = B.pending().constructor.prototype; | |
deferredPrototype.makeNodeResolver = function() { | |
return this.asCallback; | |
}; |
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 B = require("bluebird/js/main/promise")(); | |
var Bproto = B.prototype; | |
var deferredPrototype = B.pending().constructor.prototype; | |
deferredPrototype.makeNodeResolver = function() { | |
return this.asCallback; | |
}; | |
function bind(fn, ctx) { |
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
(function (navigator) { | |
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(function(location) { | |
var lat = location.coords.latitude, | |
lon = location.coords.longitude, | |
url = 'https://maps.google.com/maps?q='+lat+','+lon; | |
console.log('Latitude: %s | Longitude: %s \n%o', lat, lon, url); | |
var map = window.open(url, "GAMap", "width=1200,height=800"); | |
}); | |
} |
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
function Model(props) { | |
var obj = { 'props': props }; | |
for (o in obj.props) { | |
if (obj.props.hasOwnProperty(o)) { | |
this[o] = new Function("value", "if (!arguments.length) return typeof this.props['" + o.toString() + | |
"'] == 'function' ? this.props['" + o.toString() + "'].call(this) : this.props['" + o.toString() + "'];" + | |
"this.props['" + o.toString() + "'] = (typeof value == 'function' ? value.call(this) : value); return this") | |
} | |
} |
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
function map(collection, callback, thisArg) { | |
var index = -1, | |
length = collection ? collection.length : 0, | |
result = isArray(collection) ? Array(length) : {}; | |
callback = createCallback(callback, thisArg); | |
if (isArray(result)) { | |
while (++index < length) { | |
result[index] = callback(collection[index], index, collection); | |
} |
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
function parsePls(pls) { | |
//get number of entries | |
var matched = pls.match(/numberofentries=\d+/i); | |
matched = matched[0].split("="); | |
var numberOfEntries = matched[1]; | |
var i = 1; | |
var files = [], file, title, length; | |
while (i <= numberOfEntries) { | |
var fileRegex = new RegExp('File'+i+'=\\S+'); |
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
(function(){ | |
var differences = {}, | |
ignoreList = (prompt('Ignore filter (comma sep)?', 'jQuery, Backbone, _, $').split(/,\s?/) || []), | |
iframe = document.createElement('iframe'), | |
count = 0; ignoreList.push('prop'); | |
for (prop in window) { | |
differences[prop] = { | |
type: typeof window[prop], | |
val: window[prop] |
OlderNewer