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 moment = require('moment') | |
, dateMask = 'YYYY-MM-DD'; | |
var MeetingSchema = new Schema({ | |
... | |
}); | |
MeetingSchema | |
.virtual('startDate_yyyymmdd') | |
.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
require("express-namespace"); | |
var express = require("express"), | |
fs = require("fs"), | |
cons = require("consolidate"), | |
app = express(), | |
passport = require("passport"), | |
mongoose = require("mongoose"); | |
// 30 days for session cookie lifetime | |
var SESSION_COOKIE_LIFETIME = 1000 * 60 * 60 * 24 * 30; |
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 application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
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
{ content: | |
{ sid: '516f1018384ca80000000011', | |
title: 'node.js news', | |
slug: 'node-js-news', | |
status: 'working', | |
version: 1, | |
permalink: 'http://storify.com/storify/node-js-news', | |
description: null, | |
thumbnail: 'http://storify.com/public/img/default-thumb.gif', | |
date: |
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 go() { | |
var userId = prompt('Username?', 'Guest'); | |
checkIfUserExists(userId); | |
} | |
var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users'; | |
function userExistsCallback(userId, exists) { | |
if (exists) { | |
alert('user ' + userId + ' exists!'); |
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
<div class="column1"> | |
<div class="block"> | |
<br> | |
<br> | |
<br> | |
<br> | |
<br> | |
<br> | |
</div> | |
<div class="block1"> |
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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, 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
# Sass template | |
############### | |
.sass-cache/ | |
*.css.map | |
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | |
############### | |
.grunt | |
# node-waf configuration |
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
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
/* | |
* How to delete items from an Array in JavaScript, an exhaustive guide | |
*/ | |
// DON'T use the delete operator, it leaves a hole in the array: | |
var arr = [4, 5, 6]; | |
delete arr[1]; // arr now: [4, undefined, 6] |
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
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent | |
} |