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 | |
# CLI VPN connection for macOS | |
# Created to overcome macOS Mojave bug | |
# OSAScript "inspired" from https://github.com/alfredo/aws_vpn/blob/master/vpnconnection.scpt | |
CONFIG_FILE_PATH=$HOME/.vpn.mobileconfig | |
if [ ! -f $CONFIG_FILE_PATH ]; then | |
echo Download your .mobileconfig and save it as $CONFIG_FILE_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
#!/usr/bin/env bash | |
OUT_DIR=~/Downloads/docker | |
mkdir -p $OUT_DIR | |
docker images --format "{{.Repository}}:{{.Tag}}" | while read image ; do | |
printf "Exporting "$image"..." | |
docker save $image | gzip > $OUT_DIR/"$(echo $image | sed 's/\//__/g' | sed 's/\:/_/g')".tar.gz | |
printf "done\n" | |
done |
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 | |
IN_DIR=~/Downloads/docker | |
cd $IN_DIR | |
ls *.tar.gz | while read image ; do | |
printf "Importing "$image"..." | |
docker load -i $image -q | |
printf "done\n" | |
done |
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 | |
if [ 2 != $# ]; then | |
1>&2 echo "Please specify the required arguments: <namespace> <secret>" | |
exit 1 | |
fi | |
NAMESPACE=$1 | |
SECRET_NAME=$2 |
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
version: "3.9" | |
services: | |
gaia: | |
image: gaiaapp/gaia:latest | |
ports: | |
- "8080:8080" | |
environment: | |
- "GAIA_MONGODB_URI=mongodb://mongo/gaia" | |
- "GAIA_RUNNER_API_PASSWORD=123456" | |
- "SPRING_PROFILES_ACTIVE=github" |
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
version: '2' | |
services: | |
kafka-ui: | |
image: provectuslabs/kafka-ui:v0.4.0 | |
container_name: kafka-ui | |
ports: | |
- "8080:8080" | |
restart: always | |
environment: | |
- AUTH_TYPE="LOGIN_FORM" |
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
version: "2" | |
services: | |
elasticsearch: | |
image: elasticsearch:6.8.8 | |
environment: | |
- http.host=0.0.0.0 | |
- discovery.type=single-node | |
ulimits: | |
nofile: | |
soft: 65536 |
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
version: '3.6' | |
services: | |
zinc: | |
image: public.ecr.aws/h9e2j3o7/zinc:latest | |
ports: | |
- 4080:4080 | |
restart: always | |
environment: | |
DATA_PATH: /data | |
ZINC_FIRST_ADMIN_USER: admin |
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 | |
export AWS_REGION=<aws-region> | |
export AWS_PROFILE=<aws-profile> | |
LOG_GROUP=<log-group-name> | |
PATTERN='$${instance-id} $${interface-id} $${flow-direction} $${srcaddr} $${pkt-srcaddr} $${dstaddr} $${pkt-dstaddr} $${srcport} $${dstport} $${protocol} $${tcp-flags} $${traffic-path} $${type} $${pkt-src-aws-service} $${pkt-dst-aws-service} $${packets} $${bytes} $${start} $${end} $${action} $${log-status} $${account-id}' | |
PATTERN=${PATTERN//[\\$\{\}]/} | |
IFS=' ' read -ra PATTERN_PARTS <<< "$PATTERN" |
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 python | |
""" | |
sort terraform variables | |
it's easy to do, just follow these steps: | |
python sort_terraform_variables.py variables.tf > sorted_variables.tf | |
mv sorted_variables.tf variables.tf | |
""" | |
from __future__ import print_function | |
import sys |