^ Italo ^ As we move to microservices, and break up monoliths, we need to be able to seamlessly route requests to the right place ^ Each service should not care about auth, rate limiting, etc. so we can offload this to the gateway
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 | |
function usage { | |
echo "An easy way to look at multiple data items in a Kubernetes secret." | |
echo " Usage: $(basename $0) <secret> <data ...>" | |
exit 1 | |
} | |
if [[ $# -eq 0 ]] ; then | |
usage |
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
apiVersion: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
name: cron | |
spec: | |
schedule: "*/1 * * * *" | |
jobTemplate: | |
spec: | |
template: | |
spec: |
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 | |
connect=1 | |
while getopts "d" opt; do | |
case "$opt" in | |
d) |
## Resilient functional service design
- you don't make any money until you go to production
- you don't make any money unless your software is available & responsive
- distributed systems change the rules of making it robust - throwing money at hardware is no longer enough
- Failure is now the norm, it's unpredictable, it's going to get worse. Don't try to avoid failures, accept they'll happen
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
FROM golang:1.7.1-alpine | |
RUN apk --update add make \ | |
&& rm -rf /var/cache/apk/* | |
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 | |
########## | |
# Run this to use a cached version of node_modules stored on Amazon S3. | |
# If npm-shrinkwrap has changed, the cache is updated. | |
# | |
# Ensure the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environtment variables are set | |
# Then run the script. | |
# | |
# Example: |
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/sh | |
PRE_COMMIT="$(cat <<'EOF' | |
#!/bin/sh | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 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 | |
# Slack Info | |
webhook_url="" # Put your Slack webhook URL here | |
channel="#general" | |
# Deploy info | |
server="" # Staging, production etc. | |
check_url="" # Link within the message body | |
application_name="" # Name of your application |
The traditional way of doing async in JS was with callbacks:
function doSomethingThatTakesAWhile(callback) {
// blah blah blah doing some work that will take a few seconds
// We'll simulate this taking a while with the timeout
setTimeout(function () {
callback('done');
}, 5000)
NewerOlder