curl -Xdelete https://discovery.etcd.io/<token>/_status
https://coreos.com/docs/cluster-management/setup/cluster-discovery/
# usage | |
docker compose up |
#!/bin/sh | |
set -e | |
script=$(basename $0) | |
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
find $scriptDir -maxdepth 1 -mindepth 1 -type d -exec sh -c '(test -d {}/.git && echo {} && cd {} && git status -s && echo)' \; |
gcp () { | |
if [ -z "$1" ]; then | |
echo "CLOUDSDK_ACTIVE_CONFIG_NAME=$CLOUDSDK_ACTIVE_CONFIG_NAME" | |
gcloud config configurations list | |
return 0 | |
fi | |
export CLOUDSDK_ACTIVE_CONFIG_NAME=$1 | |
if [[ $CLOUDSDK_ACTIVE_CONFIG_NAME =~ stage ]] | |
then | |
COLOR_PROFILE='\[\033[38;5;70m\]${CLOUDSDK_ACTIVE_CONFIG_NAME}\[$(tput sgr0)\]' |
#!/bin/bash | |
set -e | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
PROGRAM=`basename $0` | |
usage() { | |
cat <<EOT | |
Usage: $PROGRAM <ENV_NAME> [up|down|status] |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "StmtCloudformationInstanceRolePolicy", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:AddRoleToInstanceProfile", | |
"iam:AttachRolePolicy", | |
"iam:CreateInstanceProfile", |
#!/bin/bash | |
# envsubst like substitution; only replacing $VAR or ${VAR} if they exists | |
# based on http://mywiki.wooledge.org/TemplateFiles | |
while read -r; do | |
while [[ $REPLY =~ \$(([a-zA-Z_][a-zA-Z_0-9]*)|\{([a-zA-Z_][a-zA-Z_0-9]*)\})(.*) ]]; do | |
if [[ -n ${!BASH_REMATCH[2]} ]]; then | |
printf %s "${REPLY%"$BASH_REMATCH"}${!BASH_REMATCH[2]}" | |
else | |
printf %s "${REPLY%"$BASH_REMATCH"}\$${BASH_REMATCH[2]}" | |
fi |
# with colors | |
awsp () { | |
export AWS_PROFILE=$1 | |
if [[ $AWS_PROFILE =~ dev ]] | |
then | |
COLOR_PROFILE='\[\033[38;5;70m\]${AWS_PROFILE}\[$(tput sgr0)\]' | |
elif [[ $AWS_PROFILE =~ prod ]] | |
then | |
COLOR_PROFILE='\[$(tput setaf 1)\]${AWS_PROFILE}\[$(tput sgr0)\]' | |
else |
#!/usr/bin/env python | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 80 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
#!/bin/sh | |
set -e | |
wget -c --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm" --output-document="jdk-8u45-linux-x64.rpm" | |
sudo rpm -i jdk-8u45-linux-x64.rpm |
curl -Xdelete https://discovery.etcd.io/<token>/_status
https://coreos.com/docs/cluster-management/setup/cluster-discovery/