We have changed our check_url implementation from curl to wget for three reasons
- It gives us the ability to retry on connection refused. Compare the command we used previously with curl:
curl -sSfL --retry 3 URL
to the current one:
gem 'foreman' | |
gem 'puma' |
require 'thor' | |
require "sub" | |
class MyApp < Thor | |
desc "parentcommand SUBCOMMAND", "Some Parent Command" | |
subcommand "sub", Sub | |
end | |
MyApp.start |
#! /bin/bash | |
array=( $@ ) | |
len=${#array[@]} | |
app=${array[$len-1]} | |
args=${array[@]:0:$len-1} | |
buffer_file=/tmp/last_heroku_run_`date +%N` | |
/usr/bin/heroku run "$args; echo \$?" --app $app 2>&1 | tee $buffer_file |
We have changed our check_url implementation from curl to wget for three reasons
curl -sSfL --retry 3 URL
to the current one:
FROM alpine:latest | |
RUN apk add --no-cache --update \ | |
python \ | |
python-dev \ | |
py-pip \ | |
build-base \ | |
git | |
RUN pip install awscli |
# Checkout a PR from the current repo | |
function copr { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; } | |
# Get the current PR from the branch name | |
function current_pr { | |
git rev-parse --abbrev-ref HEAD | grep -oE "\d+" | |
} | |
# Update the PR | |
function upr { |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"codedeploy:RegisterApplicationRevision", | |
"codedeploy:GetApplicationRevision" | |
], | |
"Resource": [ |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
#!/bin/bash | |
# Add the following commands to your setup commands to update firefox | |
# git clone https://gist.github.com/9525133.git update_firefox | |
# bash ./update_firefox/update_firefox 28 | |
# firefox --version | |
set -e | |
if [ -z "$1" ]; then |
# Create an Amazon EC2 AMI | |
ec2 = AWS::EC2.new( | |
:access_key_id => ENV['AWS_KEY'], | |
:secret_access_key => ENV['AWS_SECRET_KEY']) | |
ec2.images.create(:instance_id => instance_id) |