Also see: AWS CLI Setup
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
# Does most of the heavy listing to convert from "rubified" output from cfnflip.com website, in a cfndsl ruby definition | |
# Still a few quirks, which require manual edits. | |
cat ${1} | sed -z -E 's/Resource\("([^"]+)"\)(\s*do\s*)Type\("((AWS::)?([A-Za-z0-9]+)::([A-Za-z0-9]+)"\))/\5_\6(:\1) do/g' | \ | |
sed -E 's/Property\("([A-Za-z0-9_]+)",\s*([\[{]|".*?"|[A-Za-z0-9_]+\s*\([^()]*\))?\s*\)?\s*/\1 \2/' | \ | |
sed -E 's/("([^"]+)")(\s*)=>/\2:/' | \ | |
sed 's/})/}/' | \ | |
sed 's/])/]/' | \ | |
sed 's/"/'"'"'/g' |
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
# execute on Mac to create services: | |
docker-compose up -d | |
# "login" to client container: | |
docker exec -it my-docker-client sh | |
# within client container: | |
/ # docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
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/bash | |
# | |
# If an EC2 Instance tag Name matches a record in DNS (Route53) and the EC2 Instance is removed without Tidying Route53 Zone, | |
# This script will find the "orphaned" Zone records, and remove them. | |
# | |
rm -f /tmp/delete-r53.json | |
ZONEID=$(aws route53 list-hosted-zones-by-name |jq -r '.HostedZones[]|select (.Config.PrivateZone)|select (.Name|contains("example.com"))|.Id') | |
# | |
# Get a list of all DNS Records which don't have a running instance | |
# |
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
# Copyright (c) 2014-2015 Peter Koppstein (pkoppstein at gmail dot com) 2015.05.02 | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
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
<# | |
Replace-RDGatewayCertificate.ps1 | |
Version 1.0.1 -- fixed my bad grammar | |
by Colin Cogle <[email protected]> | |
This program is free software: you can redistribute it and/or modify it under the terms | |
of the GNU General Public License as published by the Free Software Foundation, either | |
version 3 of the License. This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
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' | |
services: | |
bitbucket: | |
image: "atlassian/bitbucket-server:5.0" | |
container_name: bitbucket | |
restart: always | |
ports: | |
- "7990:7990" | |
- "7999:7999" | |
environment: |
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 | |
apt-get -y install git bc | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
mkdir /etc/letsencrypt |
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/python | |
# most credit to the original: https://gist.github.com/brandond/6b4d22eaefbd66895f230f68f27ee586 | |
# additional credit to some modification: https://gist.github.com/danpritts/1089d878a76b14393478a7476476f97b | |
# Uncomment to RUN FOR REAL!! | |
#DEBUG = False | |
# Tag snapshots based on their associated AMI and volumes based on attached instance. | |
# format: | |
# (AMI:db5|db5) /dev/sda1 (1/4) |
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 | |
# Script to permanently remove files/folders from your git history. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
set -o errexit | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 file1 file2" | |
echo " or: $0 path1 path2" |
NewerOlder