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 | |
set -eu # do not proceed on error | |
if [ $# -lt 1 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then | |
cat <<EOF | |
Quick command to get a shell inside a running docker container. | |
Usage: dexec [container_name] [command] |
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 | |
# step 1: define the AWS parameters to target the latest task definition for an | |
# ECS service and build the parameter to override the default container command. | |
profile=[your-profile] | |
region=[your-region] | |
cluster=[your-cluster] | |
service=[your-cluster-service] | |
cmd=$(cat <<EOF | |
{"containerOverrides": [ |
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
# Nathan Papes 2020 | |
# | |
# Adds hashing and encryption capabilities to ActiveRecord models. | |
# This concern was built to conform with GDPR requirements. | |
module GDPR_Security | |
extend ActiveSupport::Concern | |
class_methods do | |
# Adds the getters and setters for encryting and decrypting attributes. | |
# For 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/bash | |
set -eu # do not proceed on error | |
if [ $1 = "help" ] || [ $1 = "-h" ] ; then | |
cat <<EOF | |
echo "Usage: $0 [--profile profile] [--region region] [--key key] [--user user] [--port port] [--ip-type public|private] [--ip ip] [cluster] [service]" | |
--profile aws profile, defaults to 'default' | |
--region aws region, defaults to 'us-east-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
flag_defs = [{ | |
:name => "member1", | |
:position => 0, | |
:value => true | |
}, | |
{ | |
:name => "member2", | |
:position => 1, | |
:value => true | |
}, |