Skip to content

Instantly share code, notes, and snippets.

@miketheartguy
miketheartguy / AWS Config
Created July 21, 2020 13:45
AWS and CodeCommit Configure for Multiple Accounts
# ~/.aws/config
[profile account1]
region = us-east-2
[profile account2]
region = us-east-2
@miketheartguy
miketheartguy / quick_pg_load.py
Created August 12, 2019 19:45
A way to quickly load some CSV data to a local Postgres database
import csv
import psycopg2
import os
import re
data_dir = "path/to/files"
data_files = [
('table1', 'table1.csv'),
('table2', 'table2.csv')
]

Keybase proof

I hereby claim:

  • I am miketheartguy on github.
  • I am miwil (https://keybase.io/miwil) on keybase.
  • I have a public key ASCu-jTW6BpQ7LinbK3YvAfvjPeuFVG39WdA255zD7NTogo

To claim this, I am signing this object:

@miketheartguy
miketheartguy / rm_sqlFormat.py
Last active July 5, 2016 20:29
Regex to remove comments and formatting from SQL
"""
Removes all formatting and comments from a SQL script.
"""
import re
def rm_sqlComments(inFile):
"""
Reads in a text file and removes all formatting and comments from SQL statements
"""