Skip to content

Instantly share code, notes, and snippets.

graphite lock lube: https://www.amazon.com/AGS-MZ-2-Extra-Graphite-Lubricant/dp/B000CIFVNQ/
white lithium grease: https://www.amazon.com/Lucas-Oil-10533-Lithium-Grease/dp/B06XY6QKS7/
rubber grease: https://www.amazon.com/GENUINE-Corrosion-Oxidation-Resistant-TS-2-34-04/dp/B01L63SXSU
@pivotalgeorge
pivotalgeorge / bosh-vm-domain-joining
Last active August 7, 2019 20:52
Guide to Domain Controller creation and joining that Domain from a BOSH-managed VM, on Azure
# THE GUIDE
## Test Environment
we started with a bbl-managed bosh environment on azure
### domain controller creation
- in the azure portal, click Create Resource
- search "domain controller". something like *Active Directory Domain Controller 2019* should come up
- select subscription and resource group corresponding to the bosh environment
- set an admin username and password
1563268779,,ui,message, amazon-ebs-us-gov-west-1: 2019-07-16T09:19:38.4509602+00:00 Setting WinRM startup type to automatic
1563268780,,ui,say,==> amazon-ebs-us-gov-west-1: Restarting Machine
1563268780,,ui,say,==> amazon-ebs-us-gov-west-1: Waiting for machine to restart...
1563268842,,ui,message, amazon-ebs-us-gov-west-1: EC2AMAZ-PVV0E71 restarted.
1563268842,,ui,error,==> amazon-ebs-us-gov-west-1: #< CLIXML
1563268842,,ui,error,==> amazon-ebs-us-gov-west-1: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj></Objs>
1563268842,,ui,say,==> amazon-ebs-us-gov-west-1: Machine successfully restarted%!(PACKER_COMMA) moving on
1563268842,,ui,say,==> amazon-ebs-us-gov-west-1: Provisioning with
@pivotalgeorge
pivotalgeorge / sql-deduplication.py
Created January 26, 2017 20:42
remove redundant sql files
PATH_TO_PGADMIN = "../pgadmin4"
import subprocess
import os, re
def remove_from_higher_directory(higher_directory, lower_directory):
#figure out which templates are unchanged between directories
diff_output, err = subprocess.Popen(["diff",
lower_directory,