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 bash | |
set -euo pipefail | |
MINOR_VERSION=$(awk -F. '{print $1 "." $2}' $(dirname $0)/../.ruby-version) | |
NAME_FILTER="{\"Type\":\"PlatformName\",\"Operator\":\"begins_with\",\"Values\":[\"Puma with Ruby ${MINOR_VERSION}\"]}" | |
VERSION_FILTER='{"Type":"PlatformVersion","Operator":"=","Values":["latest"]}' | |
PLATFORM_ARN=$( | |
aws elasticbeanstalk list-platform-versions \ |
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
class Bottles | |
def word_part(n) | |
case n | |
when 0 | |
"no more bottles" | |
when 1 | |
"1 bottle" | |
else | |
"#{n} bottles" | |
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
[StatsdInput] | |
address = "localhost:8125" | |
[StatAccumInput] | |
type = "StatAccumInput" | |
ticker_interval = 1 | |
emit_in_fields = true | |
percent_threshold = 95 | |
[statmetric_atlas_encoder] |
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
import sys | |
import requests | |
import os | |
endpoint = os.environ.get("SAFECAST_API", "https://api.safecast.org") | |
api_key = os.environ.get("SAFECAST_API_KEY") | |
if len(sys.argv) != 2: | |
print("Usage: {} <LOGFILE>".format(sys.argv[0]), file=sys.stderr) |
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
2016-05-10T08:13:03+00:00 localhost haproxy[21]: 192.168.99.1:52177 [10/May/2016:08:12:58.762] http-in webapp-http/webapp 0/0/0/5003/5003 200 185 - - ---- 1/1/1/1/0 0/0 "GET / HTTP/1.1" | |
2016-05-10T08:13:03+00:00 localhost haproxy[21]: 192.168.99.1:52178 [10/May/2016:08:12:58.916] http-in webapp-http/webapp 0/0/0/5002/5002 200 185 - - ---- 0/0/0/0/0 0/0 "GET / HTTP/1.1" | |
2016-05-10T08:49:25+00:00 localhost haproxy[21]: 192.168.99.1:53129 [10/May/2016:08:49:20.815] http-in webapp-http/webapp 161/0/1/5006/5168 200 185 - - ---- 0/0/0/0/0 0/0 "GET / HTTP/1.1" | |
2016-05-10T08:49:32+00:00 localhost haproxy[21]: 192.168.99.1:53131 [10/May/2016:08:49:27.270] http-in webapp-http/webapp 163/0/0/5005/5168 200 185 - - ---- 0/0/0/0/0 0/0 "GET / HTTP/1.1" | |
2016-05-16T00:30:59+00:00 localhost haproxy[20]: Proxy http-in started. | |
2016-05-16T00:32:42+00:00 localhost haproxy[20]: Proxy http-in started. | |
2016-05-16T00:32:56+00:00 localhost haproxy[21]: 192.168.99.1:52781 [16/May/2016:00:32:51.524] http-in webapp-http/webapp 175/0/1/50 |
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
bash -c ' | |
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
yum install -y wget | |
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://rbel.co/rbel5 | |
rpm -Uvh rbel5 | |
yum install -y rubygem-chef | |
' |
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
SHELL = /bin/bash | |
terraform_opts ?= | |
terraform_plan_opts ?= | |
.PHONY: help | |
help:: | |
@echo | |
@echo Infrastructure management using Terraform. | |
@echo |
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 'erubis' | |
class TemplateRunner | |
class OutputBuffer < String | |
alias :append= :<< | |
alias :safe_concat :<< | |
end | |
class Eruby < Erubis::Eruby |
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
@javascript | |
Scenario: confiming when saving inactive | |
Given I expect to click "OK" on a confirmation box saying "Are you sure?" | |
When I press "Save" | |
Then the confirmation box should have been displayed | |
And I should see "TV" in the "Campaign Keywords" section |
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
.terraform | |
*.tfstate* | |
terraform.tfvars | |
bootstrap-secrets.json |