Skip to content

Instantly share code, notes, and snippets.

View adamburgess's full-sized avatar

Adam Burgess adamburgess

View GitHub Profile

Keybase proof

I hereby claim:

  • I am adamburgess on github.
  • I am adamburgessbot (https://keybase.io/adamburgessbot) on keybase.
  • I have a public key ASBwOzlZqVDurqCFqooTlveAROqDl5TRZOXLfEPXoEVaBQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am adamburgess on github.
  • I am adamburgess (https://keybase.io/adamburgess) on keybase.
  • I have a public key ASDcvUqYBdTOuFU4VOTMBRQEzaFwEkB0UjKK0GfyX9nBmQo

To claim this, I am signing this object:

@adamburgess
adamburgess / start-nginx
Created June 16, 2018 06:42
Starts nginx in the current directory, and tails the log output. When the script exits, nginx is also closed. By default it starts on port 8000, but it will try more ports if that isn't available. Start on a different port by passing it as the first param.
#!/bin/bash
errcho() { echo "$@" 1>&2; }
stop() {
errcho
echo "Stopped"
if [[ $started -eq 1 ]]; then
pid=$(< $FILE_PID)
errcho "Killing nginx $pid"
kill $pid
else
var Builder = require('jspm').Builder;
var builder = new Builder();
builder
.trace(process.argv[2], {
node: true,
production: true
})
.then(function(tree) {
var root;