Skip to content

Instantly share code, notes, and snippets.

@revolunet
revolunet / browserify.js
Last active January 9, 2018 15:18
Sample split grunt-browserify config for vendors + applications files with react
var externalModules = [
'fs',
'events',
'react',
'react-addons',
'lodash'
];
module.exports = {
vendors: {
@markmarijnissen
markmarijnissen / createFamousBox.sh
Created July 17, 2014 13:15
Famo.us in one file (including css). Version 0.2.x
# set famous version here
VERSION=0.2
#
echo "// Famo.us in one file. Including CSS. Version $VERSION." > famousBox.js
# load all libraries
curl -s http://code.famo.us/lib/functionPrototypeBind.js >> famousBox.js
curl -s http://code.famo.us/lib/classList.js >> famousBox.js
curl -s http://code.famo.us/lib/requestAnimationFrame.js >> famousBox.js
@dylants
dylants / app.js
Last active February 6, 2021 17:50
Passport security using local authentication (username/password)
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;
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');