Skip to content

Instantly share code, notes, and snippets.

View gweinhold's full-sized avatar

Geoff Weinhold gweinhold

  • Irvine, California
View GitHub Profile
@gweinhold
gweinhold / pem.py
Created March 11, 2020 04:00
outputs keypairs registered in region and what's in use for ec2 instances
import boto3
regions = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2']
def get_hostname(instance):
if instance.tags:
for tag in instance.tags:
if tag["Key"] == 'Name':
return tag["Value"]
return "Unknown"
apiVersion: apps/v1
kind: Deployment
metadata:
name: windows-server-iis
spec:
selector:
matchLabels:
app: windows-server-iis
tier: backend
track: stable
@gweinhold
gweinhold / TSQL-to-POCO
Created August 9, 2017 20:48 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
@gweinhold
gweinhold / azure.cs
Created September 10, 2015 20:29
Workaround for Azure Webjobs in development machine.
public static void Main(string[] args)
{
#if DEBUG
GetJobsFromQueue();
#else
var host = new JobHost();
host.RunAndBlock();
#endif
}