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 | |
import argparse | |
import boto3 | |
def main(): | |
parser = argparse.ArgumentParser(description='Update AWS CloudFormation stack while overriding a specific parameter.') | |
parser.add_argument('--region', '-r', required=True, help='AWS region where the stack is located') | |
parser.add_argument('--stack-name', '-s', required=True, help='Name of the CloudFormation stack') | |
parser.add_argument('--parameter-key', '-k', default=None, help='Parameter key to override') | |
parser.add_argument('--parameter-value', '-v', default=None, help='New value for the parameter to override') |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Deploy Python Lambda with CloudWatch Event and SNS Notification | |
Parameters: | |
# Suspend | |
SuspendCommand: | |
Type: String | |
Description: The shell command to run |
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
TEST_ENV=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
# Ubuntu NVM and Poetry shell integration | |
export PATH=$HOME/.local/bin:$PATH | |
cd_poetry() { | |
poetry_path="$(nvm_find_up pyproject.toml | command tr -d '\n')" | |
if [[ ! -z "$poetry_path" ]]; then | |
if ! poetry env info --path &>/dev/null; then |
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 ruby | |
require 'shellwords' | |
files = `find . -iname '*.heic'`.split("\n") | |
files.each do |original_file| | |
output_file = original_file.gsub(/\.heic\z/i, ' Converted.jpg') | |
if File.exist?(output_file) | |
STDERR.puts "Skipping output #{output_file} exists." | |
else |
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 | |
""" | |
This script updates the yaml files with the python code | |
""" | |
import os | |
import re | |
ZIP_FILE_INDENT_SPACES = 10 | |
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
try: | |
import requests | |
import boto3 | |
except ImportError: | |
import subprocess | |
subprocess.run(['pip3', 'install', 'boto3', 'requests'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) | |
finally: | |
import json | |
import requests | |
import boto3 |
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
name: pip-remote | |
# this data volume contains the proxy config | |
volumes: | |
data: | |
node_modules: | |
pgdata: | |
services: |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Resources: | |
EksWithDockerLaunchTemplate: | |
Type: AWS::EC2::LaunchTemplate | |
Properties: | |
LaunchTemplateName: EksWithDocker | |
VersionDescription: Initial version | |
LaunchTemplateData: | |
# MetadataOptions: |
NewerOlder