Skip to content

Instantly share code, notes, and snippets.

View andrewfaria's full-sized avatar

Andrew Faria andrewfaria

View GitHub Profile
@andrewfaria
andrewfaria / forever-watch-restart.js
Created April 3, 2014 15:53
Beat the pesky node forever -w flag and only restart one file with this
var fs = require('fs'),
exec = require('child_process').exec,
child,
restarting = false
function watch() {
restarting = false
fs.watch('./server.js', function(e, file) {
console.log(e + ' : ' + file)
restart()
#!/bin/sh
# Selenium: http://www.chrisle.me/2013/08/running-headless-selenium-with-chrome/
# Fonts: http://alex.nederlof.com/blog/2012/11/19/installing-selenium-with-jenkins-on-ubuntu/
# Node: ppa:chris-lea/node.js
set -e
if [ -e /.installed ]; then
echo 'Already installed.'