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 RedisStore = require('connect-redis')(express); | |
app.use(express.cookieParser('appsecret')); | |
app.use(express.bodyParser()); | |
app.use(express.session({ secret:'appsecret', store:new RedisStore, cookie:{ maxAge:60000, expires: false } })); | |
app.use(express.cookieSession()); | |
app.use(app.router); |
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
/* | |
Server app | |
*/ | |
var express = require('express'); | |
var app = express(); | |
var port = 3000; | |
app.configure(function () { | |
console.log('Doing [default] configure'); | |
app.use(express.static(__dirname + '/public')); |
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
TESTS = test/spec | |
REPORTER = spec | |
XML_FILE = reports/TEST-all.xml | |
HTML_FILE = reports/coverage.html | |
test: test-mocha | |
test-ci: | |
$(MAKE) test-mocha REPORTER=xUnit > $(XML_FILE) |
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
# Install package to local repo | |
sudo npm install . -g | |
# Delete package from local repo | |
sudo rm -r /usr/local/lib/node_modules/{module} | |
# Install package from local repo | |
npm install /usr/local/lib/node_modules/{module} |
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
/*\ | |
title: $:/core/modules/blog.js | |
type: application/javascript | |
module-type: server-off | |
WordPress blog module | |
\*/ | |
(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
var spawn = require('child_process').spawn; | |
var server = require('./server'); | |
var spawns = {}; | |
server.start({port: 8080}, function () { | |
createSpawn('jasmine-node', [ 'test/spec', '--junitreport', '--forceexit' ], logToConsole, logToConsole); | |
createSpawn('casperjs', [ 'test', 'test/ui' ], logToConsole, logToConsole); | |
}); | |
function createSpawn(name, args, stdout, stderr) { |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.Runtime.InteropServices; | |
using System.Diagnostics; | |
public class MessageHelper | |
{ |
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 should = require('should'); | |
var request = require('request'); | |
var url = 'http://localhost:8080'; | |
var HttpServer = require('./server').HttpServer; | |
var server; | |
describe('HttpServer', function () { | |
before(function (done) { | |
server = new HttpServer({port: 8080}).start(done); |
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
def jinx(environ, start_response): | |
start_response('200', []) | |
return ['hello world'] | |
def init(config): | |
config['selector'].add('/jinx', GET=jinx) |
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
#export CATALINA_HOME=/usr/share/tomcat | |
export MAVEN_OPTS="-Xms512m -Xmx2048m -XX:MaxPermSize=512m" | |
# export MAVEN_OPTS="-Xms512m -Xmx2048m -XX:MaxPermSize=512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" | |
export LIQUIBASE_HOME=/usr/share/java/liquibase-2.0.3 | |
export MULE_HOME=/usr/share/java/mule-standalone-3.2.1 | |
export ANT_HOME=/usr/share/ant | |
export GRAILS_HOME=/usr/share/grails | |
export REDIS_HOME=/usr/share/redis | |
export JSCOVERAGE_HOME=/usr/share/jscoverage | |
export JMETER_HOME=/usr/share/jmeter |
OlderNewer