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
def qaCatalinaBase = '/opt/apache-tomcat-8-qa' | |
def qaHttpPort = 8081 | |
def stagingCatalinaBase = '/opt/apache-tomcat-8-staging' | |
def stagingHttpPort = 8082 | |
def perfsCatalinaBase = '/opt/apache-tomcat-8-perfs' | |
def perfsHttpPort = 8084 | |
def productionCatalinaBase = '/opt/apache-tomcat-8-production' |
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 | |
if pgrep -f "/usr/share/foreman" 2> /dev/null | |
then | |
echo "Foreman appears to already be installed. Exiting..." | |
else | |
sudo mkdir -p /etc/puppet | |
sudo touch /etc/puppet/autosign.conf | |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/gdamore/mangos" | |
"github.com/gdamore/mangos/protocol/pub" | |
"github.com/gdamore/mangos/protocol/sub" | |
"github.com/gdamore/mangos/transport/ipc" |
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
echo "Flipping tables! (╯°□°)╯︵ ┻━┻" | |
num_rules=3 | |
real=3 # exposed to the ELB as port 443 | |
test=4 # used to install test certs for domain verification | |
health=5 # used by the ELB healthcheck | |
blue_prefix=855 | |
green_prefix=866 |
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 'open-uri' | |
require 'nokogiri' | |
require 'net/http' | |
omnitruck_host='opscode-omnitruck-release.s3.amazonaws.com' | |
omnitruck_url="http://#{omnitruck_host}/" | |
doc = Nokogiri::HTML(open(omnitruck_url)) | |
rpm_list = doc.xpath('//key/text()[contains(.,"el/")]').map(&:text) |
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 'ohai' | |
> o = Ohai::System.new | |
> o.all_plugins | |
> o["hostname"] |
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
cat list_aws_events.rb | |
require 'fog' # gem install fog | |
aws = Fog::Compute::AWS.new | |
status = aws.describe_instance_status.body["instanceStatusSet"] | |
events = {} | |
status.each do |st| | |
if st["eventsSet"].size > 0 |
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 ruby | |
# If you have many IAM users, it's not easy to find which user | |
# owns a particular IAM key from the console. | |
# This script can be run with the first argument as the access key id. | |
require 'rubygems' | |
require 'ap' # gem install awesome_print | |
require 'fog' # gem install fog |
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 'fog' | |
# assuming your IAM role is named 'my-role' and has S3 access: | |
uri = URI('http://169.254.169.254/latest/meta-data/iam/security-credentials/my-role') | |
res = Net::HTTP.get_response(uri) | |
aws_creds = JSON.parse(res.body) |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2014 | |
Copyright (C) 2014 Addy Osmani @addyosmani | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |