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 express = require('express'); | |
var app = express(); | |
app.use(express.bodyParser()); | |
var headlines = [ | |
{ author : 'John Smith', text : "You will not believe what this child does next."}, | |
{ author : 'Jane Doe', text : "It started as a protest, then turned into a party. Thats not even the interesting part."}, | |
{ author : 'Alice Example', text : "Can we squeeze two hundred jellybeans in one package? Yah probably."}, | |
{ author : 'Bob Allan', text : "This famous celebrity is opposed to something you are too."} |
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 Request(req, res) { | |
this.upstream = request | |
this.downstream = response | |
} | |
Request.prototype = { | |
start: function() { | |
// kick off the default chain of handlers | |
}, |
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
apply plugin: 'war' | |
configurations { jetty9 } | |
dependencies.jetty9 'org.eclipse.jetty:jetty-ant:9.0.2.v20130417' | |
ant { | |
taskdef(name: 'jettyRun', classname: 'org.eclipse.jetty.ant.JettyRunTask', classpath: configurations.jetty9.asPath) | |
taskdef(name: 'jettyStop', classname: 'org.eclipse.jetty.ant.JettyStopTask', classpath: configurations.jetty9.asPath) | |
} |
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 crypto = require("crypto") | |
module.exports = function() { | |
var bytes = crypto.randomBytes(16) | |
bytes[6] &= 0x0f // 0000xxxx | |
bytes[6] += 0x40 // 0100xxxx | |
bytes[8] &= 0x3f // 00xxxxxx | |
bytes[8] += 0x80 // 10xxxxxx |
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
package de.greenrobot.util; | |
import java.util.concurrent.Executor; | |
import android.os.AsyncTask; | |
import android.os.Build; | |
/** | |
* Uses level 11 APIs when possible to use parallel/serial executors and falls back to standard execution if API level | |
* is below 11. |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
/** | |
* TaskRepository class deals with task persistence | |
*/ | |
function TaskRepository() { | |
this.tasks = []; | |
this.nextId = 1; | |
} | |
/** | |
* Find a task by id | |
* Param: id of the task to find |
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 xmpp = require('node-xmpp'); | |
//Set node-xmpp options. | |
//Replace with your projectID in the jid and your API key in the password | |
//The key settings for CCS are the last two to force SSL and Plain SASL auth. | |
var options = { | |
type: 'client', | |
jid: 'XXXXXXXXX@gcm.googleapis.com', | |
password: 'XXXXXXXX', | |
port: 5235, |
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
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev |
OlderNewer