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
#!/usr/bin/env node | |
var http = require('http'); | |
var server = http.createServer(function(req, res){ | |
}).listen(8080, function(){ | |
// a('api.vcap.me'); | |
a('localhost', 8080); | |
}); |
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
#!/bin/bash | |
hwaddr=$(ifconfig -a | grep HWaddr | awk '{print $5}') | |
echo "Update /etc/udev/rules.d/70-persistent-net.rules" | |
cat <<-EOS > /etc/udev/rules.d/70-persistent-net.rules | |
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="${hwaddr}", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" | |
EOS | |
echo "Update hostname and ipaddress" | |
host=$(echo $hwaddr | awk -F: '{print $6}' | tr '[a-z]' '[A-Z]') |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nats_server | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: Starts the nats message bus server | |
### END INIT INFO | |
export RUBY_PATH=/home/ubuntu/.rvm/rubies/ruby-1.9.2-p180 | |
export GEM_PATH=/home/ubuntu/.rvm/gems/ruby-1.9.2-p180 | |
EXEC_USER=ubuntu |