This is a sheet with some interesting GIT commands.
This content is shared under a Creative Commons Attribution-ShareAlike 4.0 International.
/** | |
* This is from many sources. Important points: | |
* - A promise will immediately start resolving when created unless it’s in a function being passed around. | |
* - Note the special syntax when adding promises to arrays to avoid having the Promise begin resolving. | |
* - Note the various patterns, series and parallel, with concurrency control. | |
* | |
* This work is licensed under the MIT License as follows: | |
* | |
* Copyright 2018 E.A.Soto <[email protected]> | |
* |
#!/bin/bash | |
# Get the directory where the script lives. | |
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | |
# Setup a variable for easy reference to the pidfile | |
pidfile=${SCRIPT_DIR}/tunnel.pid | |
# Check to see if there is a pidfile already... | |
if [ -f $pidfile ]; then | |
# There is, so the tunnel might be up! |
#!/bin/bash | |
# Get the directory where the script lives. | |
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | |
# Setup a variable for easy reference to the pidfile | |
pidfile=${SCRIPT_DIR}/tunnel.pid | |
# Check for our pidfile, which we expect in order to be able to control the process | |
if [ ! -f $pidfile ]; then | |
echo "Tunnel pidfile does not exist. Tunnel might not up or not known! Exiting!" |
#!/bin/bash | |
echo "Say something here to confirm some action." | |
echo "" | |
# Wait for the user to press any KEY to proceed or allow them to Ctrl+C | |
read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n' | |
# Do your work after this... it won't execute if the user does Ctrl+C at the prompt! | |
#!/bin/bash | |
################################################################ | |
# This is a script that pulls a list of IPs from AWS | |
# published IP list, then parses it looking for a | |
# specific region and service. | |
# | |
# Dependencies: | |
# This script needs: | |
# * Internet access |
This is a sheet with some interesting GIT commands.
This content is shared under a Creative Commons Attribution-ShareAlike 4.0 International.
#!/bin/bash | |
############################################################################ | |
# Random Sample - rsample.sh | |
# | |
# A utility to output a sample number of lines from | |
# a text file based on a percentage passed in as an | |
# argument. | |
# | |
# Dependencies: |
This post explains how to manually create a Snapshot of an Elastic Cloud instance to an AWS S3 Bucket using what Elasticsearch calls a custom repository.
This is based on the following:
This post explains how to create an AWS S3 Bucket and an IAM User with programmatic access to the bucket.
You will need access to the AWS S3 console for your account and have permissions to create new buckets and create new IAM users.
This is based on: