Skip to content

Instantly share code, notes, and snippets.

@frankkwabenaaboagye
frankkwabenaaboagye / pythonvEnv.py
Created February 18, 2025 09:05
python virtual env
# list all py versions
py -0
# create virtual env with a particular version
py -3.12 -m venv venv
@frankkwabenaaboagye
frankkwabenaaboagye / git_script.py
Created September 11, 2024 11:10
Script that automates common Git commands. Pass the commit message as an argument when running the script
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')}")
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
@frankkwabenaaboagye
frankkwabenaaboagye / UnzipAndOpen.py
Created September 8, 2024 12:51
Just speed up development
'''
Inspired by: Josh Long
'''
import subprocess
import sys
import os
def run(c):
print('running: %s' % c)