| Title | Description
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
set -o pipefail | |
_exit_error() { | |
message=$1 | |
code=$2 | |
echo "$message" >&2 | |
exit $code | |
} | |
_exit_ok() { |
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 String | |
def undent | |
gsub(/^.{#{slice(/^ +/).length}}/, '') | |
end | |
end | |
#Usage: | |
test = <<-EOS.undent | |
testing unindent | |
..another line |
Code | Title | Duration | Link |
---|---|---|---|
Keynote | Andy Jassy Keynote Announcement Recap | 0:01 | https://www.youtube.com/watch?v=TZCxKAM2GtQ |
Keynote | AWS re:Invent 2016 Keynote: Andy Jassy | 2:22 | https://www.youtube.com/watch?v=8RrbUyw9uSg |
Keynote | AWS re:Invent 2016 Keynote: Werner Vogels | 2:16 | https://www.youtube.com/watch?v=ZDScBNahsL4 |
Keynote | [Tuesday Night Live with Jame |
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 -euo pipefail | |
: ${AWS_CREDENTIALS_FILE="$HOME/.aws/credentials"} | |
: ${STS_SESSION_DURATION=36000} | |
sts_keychain_get_session_token() { | |
echo generating temporary credentials via sts >&2 | |
aws-keychain exec $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
#!/bin/bash | |
usage() | |
{ | |
cat <<EOF | |
Usage: $(basename $0) [options] | |
This shell script is a simple wrapper around the openssl binary. It uses | |
s_client to get certificate information from remote hosts, or x509 for local | |
certificate files. It can parse out some of the openssl output or just dump all |
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
# Thin serving Rails. | |
upstream app_server { | |
server 127.0.0.1:3050 fail_timeout=0; | |
} | |
# SSL/TLS certificates - the key should be 4096 bit generated with: 'openssl genrsa -des3 -out server.key 4096' | |
ssl_certificate_key /var/app/deploy/www.thisisatest.com.key; | |
ssl_certificate /var/app/deploy/www.thisisatest.com.chained.crt; | |
# Ideally we'd have only TLSv1.2, but that compromises client support significantly |
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
Memorandum by the Prime Minister. | |
To do our work, we all have to read a mass of papers. Nearly all of them are far too long. This wastes time, while energy has to he spent in looking for the essential points. | |
I ask my colleagues and their staffs to see to it that their Reports are shorter. | |
(i) The aim should be Reports which set out the main points in a series of short, crisp paragraphs. | |
(ii) If a Report relies on detailed analysis of some complicated factors, or on statistics, these should be set out in an Appendix. | |
(iii) Often the occasion is best met by submitting not a full-dress Report, but an Aide-memoire consisting of headings only, which can be expanded orally if needed. | |
(iv) Let us have an end of such phrases as these: |
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
- name: create required directories | |
sudo_user: "{{ deploy_user }}" | |
file: path="{{ item }}" state=directory owner={{ deploy_user }} group={{ deploy_user }} mode=0755 | |
with_items: | |
- "{{ git_repo_path }}" | |
- "{{ shared_path }}" | |
- "{{ archive_path }}" | |
- "{{ releases_path }}" |
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
--- | |
- name: Deploy new site release | |
user: deployer | |
hosts: all | |
tasks: | |
- name: Fetch repo updates | |
git: > | |
repo=git@github.com:my/repo.git |
NewerOlder