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 | |
# Setup a new ubuntu 12.04 or 12.10 server appropriate for deploying nodejs and/or ruby applications. | |
set -x | |
set -e | |
# mkdir -p /tmp/user_data | |
date >> /tmp/provisioning_began |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script> | |
<script src="https://s3-us-west-2.amazonaws.com/foundry-assets/sequence-diagram-min.js"></script> | |
<script src="sequence.js"></script> | |
</head> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script> | |
<script src="https://s3-us-west-2.amazonaws.com/foundry-assets/sequence-diagram-min.js"></script> | |
<script src="sequence.js"></script> | |
</head> |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="/css/style.css" type="text/css"> | |
<script src="/js/jquery.min.js" type="text/javascript"></script> | |
<script src="/js/modernizr-2.5.3.min.js" type="text/javascript"></script> |
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
fake_fuse () { | |
echo "hello faker fuse" | |
apt-get -y install libfuse2 | |
cd /tmp ; apt-get download fuse | |
cd /tmp ; dpkg-deb -x fuse_* . | |
cd /tmp ; dpkg-deb -e fuse_* | |
cd /tmp ; rm fuse_*.deb | |
cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst | |
cd /tmp ; dpkg-deb -b . /fuse.deb | |
cd /tmp ; dpkg -i /fuse.deb |
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
# installs elasticsearch on ubuntu 12.04 and 12.10 | |
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.1.deb | |
sudo dpkg -i elasticsearch-0.20.1.deb |
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/ruby | |
require 'net/http' | |
META_BASE = "/2008-02-01/meta-data" | |
def server | |
@server ||= Net::HTTP.new("169.254.169.254") | |
end | |
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
NEWRELIC_KEY=$1 | |
wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list | |
apt-key adv --keyserver hkp://subkeys.pgp.net --recv-keys 548C16BF | |
apt-get update | |
apt-get install newrelic-sysmond | |
nrsysmond-config --set license_key=${NEWRELIC_KEY} | |
/etc/init.d/newrelic-sysmond start |
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
require 'rubygems' | |
require 'faraday' | |
require 'json' | |
require 'pry' | |
require 'openssl' | |
require 'hashie' | |
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE | |
class Nova < Hash | |
include Hashie::Extensions::IndifferentAccess |
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
require'rubygems' | |
require 'octokit' | |
$organization='att-innovate' | |
$username='fairchild' | |
$token="yertoken" | |
def gh | |
@gh||= Octokit::Client.new(:login => $username, :oauth_token => $token) | |
end |