Skip to content

Instantly share code, notes, and snippets.

aplocher / data-dict-gen.sql
Created Feb 8, 2021
Generate a complete markdown data dictionary template, including a table of contents, for Azure DevOps wiki from a list of tables. Will also display PK and FK info
View data-dict-gen.sql
use my-database
declare @tableList table (Id int not null primary key identity, DatabaseName varchar(50), SchemaName varchar(50), TableName varchar(50), TableDescription varchar(max))
-- Which tables to generate the markdown for?
insert into @tableList (DatabaseName, SchemaName, TableName, TableDescription) values
('my-database', 'dbo', 'Entity', ''),
aplocher / data-dict-gen-simple.sql
Created Feb 8, 2021
T-SQL script to generate data dict. markdown to be used in Azure DevOps Wiki from a SQL Server table
View data-dict-gen-simple.sql
use varis_p
@table varchar(50) = 'dbo.SomeTable'
select md from (
-- Row 1 - Headers
-2 as colid,
View resume.json
"basics": {
"name": "Adam Plocher",
"picture": "",
"label": "Software Developer at Varis LLC",
"headline": "A motivated and professional software engineer with over 15 years of experience in the industry",
"summary": "Experienced full-stack developer with an appreciation for design patterns.",
"website": "",
"yearsOfExperience": 19,
"username": "aplocher",
aplocher / CmderHere.bat
Created Jan 14, 2020
Small bat file that will prompt for Cmder's root dir. It will set the CMDER_ROOT env variable and register "Cmder Here" context menu entries in Windows Explorer.
View CmderHere.bat
@echo off
net file > NUL 2>&1
if not [%ERRORLEVEL%]==[0] (
goto :done
echo Enter the path to the CMDER folder...
aplocher / Program.cs
Created May 30, 2019
A simple C# function (and console app) to flatten an array down to a specified generic type
View Program.cs
using System;
using System.Collections.Generic;
namespace ConsoleApp3
// This is a sample Console App written in C# / .NET Core (but should work with .NET Framework).
// This will flatten an array structure, recursively, down to the generic type specified (or throw an exception if the input is bad)
class Program
aplocher / simplify3d_ending_script.gcode
Created Sep 2, 2018
Simplify 3D G-Code starting script to reduce temp (to reduce oozing), perform homing, auto-leveling, return the temp to the target, and then clean nozzle. Stop script will turn off extruder, bed, move Z up a little bit, move X slightly (so if oozing occurs, hopefully not on the final printed piece), and move Y forward, then turn the fan off afte…
View simplify3d_ending_script.gcode
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G91 ; relative movement
G1 F150 ; slow Z rate
G1 Z10 ; Z up 15mm
G1 X3 ; X 3mm
G1 Y3 ; Y 3mm
G90 ; back to absolute movement
G1 Y200 F1000
M84 ; disable motors
View BackupScriptForTony.bat
@echo off
:: <config>
:: Base folder where the new sub-folders will be created. Do NOT include a trailing slash [eg, c:\temp is ok, but not c:\temp\]
set "baseDir=C:\TEMPOUTPUT"
:: The second destination to recieve a copy of these files
set "baseDir2=C:\TEMPOUTPUT2"
aplocher /
Last active Mar 17, 2017
Python script to detect signal from MAX4466 Mic Amp and send an RF signal to power on/off a plug when it detects two clap sounds (aka "DIY The Clapper"). Implemented on Raspberry Pi Zero
# usage: [-h] [--on | --off]
# With no arguments, this will run continuously and listen for clap noises to
# trigger an RF power plug to turn on or off (aka The Clapper). Can
# alternatively be used to manually control a power plug with arguments
# optional arguments:
# -h, --help show this help message and exit
aplocher / setup_mssql.ps1
Created Jan 21, 2017 — forked from DamianZaremba/setup_mssql.ps1
MSSQL Server Setup - designed to be run via ssh, ie vagrant under opentable/win-2012r2-standard-amd64-nocm
View setup_mssql.ps1
$ErrorActionPreference = "Stop"
$client = new-object System.Net.WebClient
# Reset vagrant password so it's not expired
# Setup UAC wrapper ;(
if(!(Test-Path -Path "C:\")) {
Write-Output "Setting up UAC wrapper"
$client.DownloadFile("", "C:\")
aplocher / GStreamer-1.0 some
Created Sep 20, 2016 — forked from strezh/GStreamer-1.0 some
GStreamer-1.0 personal cheat sheet
View GStreamer-1.0 some
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \