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
/* ProtonMail */ | |
/* CLASSIC THEME */ | |
body { font-size: 14px } | |
body, | |
.pm_opensans { | |
font-family: 'Lucida Grande', Verdana, Arial, sans-serif | |
} |
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 request = require("request"), | |
csv = require("csv"); | |
module.exports = function(app) { | |
// accepts the POST form submit of the CSV file | |
app.post("/upload/data", function(req, res) { | |
// the name under "files" must correspond to the name of the | |
// file input field in the submitted form (here: "csvdata") | |
csv().from.path(req.files.csvdata.path, { | |
delimiter: ",", |
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
#!upstart | |
description "nodemon server for myapp" | |
author "ubuntu" | |
start on startup | |
stop on shutdown | |
script | |
export HOME="/home/ubuntu/git/myapp" |
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
/* global module:true */ | |
module.exports = function(grunt) { | |
"use strict"; | |
grunt.initConfig({ | |
watch: { | |
files: "done.testing", | |
tasks: ["shell"], | |
options: { | |
event: ["added"] |
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
// config/mock/nock.js | |
import nock from 'nock'; | |
import config from '../../config'; | |
// disable all connections so that we use only the mocks | |
nock.disableNetConnect(); | |
nock(config.blah.api.rootUrl) |
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
"use strict"; | |
var mongoose = require("mongoose"); | |
var mockMongooseModel = {}; | |
module.exports = mockMongooseModel; | |
/** | |
* This function is useful for tests that require Mongoose models | |
* loaded prior to loading the test file. This should be called in |
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
const initialState = { | |
... | |
}; | |
export default function childReducer(state = initialState, action) { | |
switch (action.type) { | |
// process the actions as you would normally in any reducer | |
case CHILD_REDUCER_ACTION: | |
return Object.assign({}, state, { | |
... |
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
# The first node application | |
upstream app-one { | |
server 127.0.0.1:3000 max_fails=0; | |
} | |
# The second node application | |
upstream app-two { | |
server 127.0.0.1:3001 max_fails=0; | |
} |
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
/*global define:true, sessionStorage:true*/ | |
define([ | |
"underscore" | |
], function(_) { | |
"use-strict"; | |
var appState, sessionStorageNamespace; | |
sessionStorageNamespace = "app.appState"; |
NewerOlder