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 randomString(length) { | |
var str = ""; | |
length = length || 1; | |
while(str.length < length) { | |
str += (Math.round(Math.random() * 36)).toString(36) | |
} | |
return str; | |
} |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<polymer-element name="my-element"> |
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
Session.setDefault("Template.myTemp.navigationState", 0) | |
Template.myTemp.navigationStateClass = function() { | |
return ["open", "half-open", "closed"][Session.get("Template.myTemp.navigationState")] | |
} |
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.registerHelper("debug", function(optionalValue) { | |
if (optionalValue) { | |
return console.log("Value:", optionalValue); | |
} else { | |
return console.log("Current Context:", 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
<input type="checkbox" id="role_admin" name="role_admin" <!--data:ei7myswxkeejwecx7--="">> admin |
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
module.exports = exports = function(cArgs) { | |
var private = Math.random() * 1000; | |
function MyClass(args) | |
{ | |
console.log('I am: '); | |
console.log(this); | |
} | |
MyClass.prototype.get = function() |
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
#!/bin/sh | |
NODE_ENV="production" | |
node $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
var http = require('http') | |
, path = require('path') | |
, url = require('url') | |
, fs = require('fs') | |
, mime = require('mime') | |
, StatMan | |
, server; | |
StatMan = function( server ) | |
{ |
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
if (typeof define !== 'function') { | |
var define = require('amdefine')(module); | |
} | |
define(function(require) { | |
"use strict"; | |
var CountDown, | |
WEEK_MILLIS, DAY_MILLIS, HOUR_MILLIS, MINUTE_MILLIS; |
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
// Path: <project>/ | |
var config = require('./config'); | |
var express = require('express'); | |
var app = express(); | |
app.use(express.bodyParser()); | |
app.use(express.methodOverride()); | |
app.use(app.router); | |
app.use(function(err, req, res, next){ |