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 'yaml' | |
require 'pathname' | |
require 'active_support/all' | |
def convert(f) | |
filename = Pathname.new(f) | |
yaml = YAML.load_file(filename) | |
name = filename.basename('.yml').to_s | |
File.write(filename, { |
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 | |
set -u | |
echo "Checking for response status ${1} from URL: ${2}" | |
try_count=0 | |
while true | |
do | |
((try_count++)) | |
response_status="$(curl -s -o /dev/null -w "%{http_code}" "${2}")" | |
if [ "$response_status" == "${1}" ] |
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
# Rack middleware that reads environment variable HOST (value such as: app.example.com) | |
# to override request Host headers, forcing the app to use this value for URLs & redirects. | |
# | |
# If env var HOST is unset, then this middleware does nothing. | |
# | |
# Useful for when a Rails app is the origin behind a CDN/proxy, so that all generated | |
# URLs point to the canonical hostname of the CDN, and not the origin itself. | |
# | |
# For a Rails app, | |
# - save this file in config/initializers/set_default_host.rb |
OlderNewer