This file contains hidden or 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 'sinatra' | |
| require 'dm-core' | |
| DataMapper.setup(:default, ENV['DATABASE_URL'] || 'sqlite3://my.db') | |
| module Activity | |
| class Dogs | |
| include DataMapper::Resource |
This file contains hidden or 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 'sinatra' | |
| require 'rest_client' | |
| require 'json' | |
| RIAK_SERVER = "192.168.2.2" | |
| get '/:bucket' do | |
| keys = JSON.parse(RestClient.get "http://#{RIAK_SERVER}:8098/raw/#{params[:bucket]}")['keys'] | |
| "<ul>" + keys.collect { |k| "<li><a href='/#{params[:bucket]}/#{k}'>#{k}</a>" }.join('') |
This file contains hidden or 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
| {application, relay, | |
| [{description, "relay"}, | |
| {vsn, "0.01"}, | |
| {modules, [ | |
| relay_app, | |
| relay_listener, | |
| relay_sup, | |
| relay_worker | |
| ]}, | |
| {registered, []}, |
This file contains hidden or 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 ruby | |
| require 'date' | |
| require 'time' | |
| $all_events = {} | |
| class Event | |
| attr_reader :date, :branch, :filename |
This file contains hidden or 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
| # vim: tabstop=4 shiftwidth=4 softtabstop=4 | |
| # Copyright 2011 OpenStack LLC. | |
| # All Rights Reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may | |
| # not use this file except in compliance with the License. You may obtain | |
| # a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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 | |
| # This script exits on an error so that errors don't compound and you see | |
| # # only the first error that occured. | |
| # set -o errexit | |
| # Print the commands being run so that we can see the command that triggers | |
| # an error. It is also useful for following allowing as the install occurs. | |
| set -o xtrace |
This file contains hidden or 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 | |
| apt-get update | |
| apt-get install git -y | |
| git clone https://github.com/cloudbuilders/devstack.git | |
| cd devstack | |
| echo ADMIN_PASSWORD=stack4eva >> localrc | |
| echo MYSQL_PASSWORD=mysql4eva >> localrc | |
| echo RABBIT_PASSWORD=rabbit4eva >> localrc | |
| echo SERVICE_TOKEN=12345678901234567890 >> localrc | |
| ./stack.sh |
This file contains hidden or 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 'em-proxy' | |
| require 'http/parser' # gem install http_parser.rb | |
| require 'UUID' | |
| # > ruby em-proxy-http.rb | |
| # > curl --proxy localhost:9889 www.google.com | |
| host = "0.0.0.0" | |
| port = 9889 |
This file contains hidden or 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 | |
| while ! ssh -o ConnectTimeout=1 -o PasswordAuthentication=no $1 uptime; do | |
| sleep 1 | |
| done | |
| say the computer is a boot |
This file contains hidden or 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 | |
| apt-get update | |
| echo root:passwd | chpasswd | |
| add-apt-repository ppa:juju/pkgs | |
| apt-get update && apt-get install juju |