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 '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 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 'octokit' | |
| $organization='att-innovate' | |
| $username='fairchild' | |
| $token="yertoken" | |
| def gh | |
| @gh||= Octokit::Client.new(:login => $username, :oauth_token => $token) | |
| end |
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
| input { | |
| redis { | |
| host => "127.0.0.1" | |
| type => "redis-input" | |
| # these settings should match the output of the agent | |
| data_type => "list" | |
| key => "logstash" | |
| # We use json_event here since the sender is a logstash agent | |
| message_format => "json_event" | |
| } |
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 | |
| set -x | |
| set -e | |
| # Setup a new ubuntu 12.04 server | |
| # this file can be used as the userdata file for a new instance. | |
| # It should set any environments variables needed, and select which setup functions to run, in what order. | |
| USERNAME=${1:-deploy} | |
| APPNAME=${2:-deploy} |
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-synchrony" | |
| require "em-synchrony/em-http" | |
| require 'faraday' | |
| class Kiss | |
| # post event data to kiss_metrics API | |
| def self.send(data) | |
| @conn ||= Faraday.new(:url => 'https://trk.kissmetrics.com/', :ssl => {:ca_path => "/usr/lib/ssl/certs"}) do |builder| | |
| builder.response :logger |
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
| cd ~ | |
| sudo apt-get install unzip | |
| sudo apt-get install python-software-properties -y | |
| sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
| sudo apt-get update | |
| sudo apt-get install sun-java6-jre sun-java6-plugin -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz |
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
| # merge a hash, only updating the first hash with values from the second where the first already has an exisitng key | |
| # for example, | |
| # a= {"a"=>1, "b"=>2, "z"=>3} | |
| # b= {"x"=>99, "y"=>88, "z"=>77} | |
| # will result in {"a"=>1, "b"=>2, "z"=>77} | |
| def update_existing(a, b) | |
| a.inject({}){|sum, el| (b.has_key?(el.first) && b[el.first]) ? sum.update(el.first=>b[el.first]) : sum[el.first]=a[el.first]; sum} | |
| end |
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
| source :rubygems | |
| gem 'sinatra' | |
| gem 'json' | |
| gem 'omniauth' | |
| gem 'omniauth-oauth2' | |
| gem 'omniauth-github' | |
| # gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__) | |
| gem 'thin' |
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
| @@ layout | |
| %html | |
| %head | |
| %link(rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css") | |
| %body | |
| .container | |
| .content | |
| = yield |
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 'pry' | |
| require 'ticketmaster' | |
| require 'ticketmaster-redmine' | |
| require 'ticketmaster-kanbanpad' | |
| def redmine(opts={}) | |
| @redmine ||= TicketMaster.new(:redmine, {:username => "fairchild", :password => "me", :server => "https://tracker.tfoundry.com/"}) | |
| end |