This file contains hidden or 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
# list all py versions | |
py -0 | |
# create virtual env with a particular version | |
py -3.12 -m venv venv |
This file contains hidden or 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
import subprocess | |
import sys | |
def run_command(command): | |
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
if result.returncode == 0: | |
print(result.stdout.decode('utf-8')) | |
else: | |
print(f"Error: {result.stderr.decode('utf-8')}") |
This file contains hidden or 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: my stack template | |
# my VPC with public subnet and Internet Gateway | |
Parameters: | |
myVpcCidr: | |
Type: String | |
Default: 10.0.0.0/20 |
This file contains hidden or 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
''' | |
Inspired by: Josh Long | |
''' | |
import subprocess | |
import sys | |
import os | |
def run(c): | |
print('running: %s' % c) |