Skip to content

Instantly share code, notes, and snippets.

@nodekid
nodekid / node-app-upstart.conf
Created November 4, 2013 23:05
Basic Upstart Job for Node Application
description "Node App Upstart Job"
author "Node Kid <_@nodekid.com>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 5 60
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
var pubsub = {};
(function(q) {
var topics = {}, subUid = -1;
q.subscribe = function(topic, func) {
if (!topics[topic]) {
topics[topic] = [];
}
var token = (++subUid).toString();
topics[topic].push({
token: token,
@nodekid
nodekid / gulpfile.js
Last active August 29, 2015 14:01
Basic Browserify & Gulp Implementation
var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('build', function () {
return (
browserify(['./src/main.js'])
.bundle()
.pipe(source('main.js'))
.pipe(gulp.dest('./build'))

Keybase proof

I hereby claim:

  • I am nodekid on github.
  • I am nodekid (https://keybase.io/nodekid) on keybase.
  • I have a public key whose fingerprint is 4DFB E11A 09A3 9040 1ADA 2AD9 4CB5 8FA8 209C 0923

To claim this, I am signing this object:

#!/bin/sh
[ $# -eq 0 ] && { echo "Usage: ${0} version-string" ; exit 1; }
VERSION=${1}
PREFIX="/usr/local"
SRC_CWD="${PREFIX}/src"
SRC_DIR="${SRC_CWD}/node"
SRC_GIT="git://github.com/joyent/node.git"
require('must')
supertest = require('supertest')
server = require('../src/server')
api = supertest(server)
describe('GET /', function() {
it('must respond with json', function(done) {
api
.get('/')