Skip to content

Instantly share code, notes, and snippets.

David Mohundro drmohundro

Block or report user

Report or block drmohundro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
drmohundro / pipelines.ps1
Created May 26, 2020
Get sqlcmd.exe in Azure Pipelines
View pipelines.ps1
$ErrorActionPreference = 'Stop';
Invoke-WebRequest '' -OutFile
try {
Add-Type -AssemblyName System.IO.Compression.FileSystem
} catch { };
[System.IO.Compression.ZipFile]::ExtractToDirectory('./', './')
drmohundro /
Created Dec 16, 2017
GhostScript PDF to text stdout
# requires ghostscript to be installed first - on mac, install with `brew install ghostscript`
# -sDEVICE=txtwrite - text writer
# -sOutputFile=- - use stdout instead of a file
# -q - quiet - prevent writing normal messages to output
# -dNOPAUSE - disable prompt and pause at end of each page
# -dBATCH - indicates batch operation so exits at end of processing
gs -sDEVICE=txtwrite -sOutputFile=- -q -dNOPAUSE -dBATCH to-be-processed.pdf
drmohundro / Get-FrameworkVersions.ps1
Last active Dec 2, 2019
PowerShell script to return all installed .NET Framework versions.
View Get-FrameworkVersions.ps1
Returns the install .NET Framework versions.
The script looks through the registry using the notes from the below
MSDN links to determine which versions of .NET are installed.
drmohundro / IisExpressJob.ps1
Last active Dec 25, 2018
PowerShell functions to start/stop IIS Express in the specified directory as a background job
View IisExpressJob.ps1
$jobName = 'IisExpressJob'
function Start-IisExpress($pathToSource) {
Start-Job -Name $jobName -Arg $pathToSource -ScriptBlock {
param ($pathToSource)
& 'C:\Program Files (x86)\IIS Express\iisexpress.exe' /port:1234 /path:$pathToSource
function Stop-IisExpress {
drmohundro / example.swift
Last active Mar 9, 2018
Linux namespace and SWXMLHash
View example.swift
let podcastURL = URL(string: "")!
let contents = """
<rss xmlns:dc="" xmlns:itunes="" xmlns:media="" version="2.0" xml:base="">
<title>Some Title</title>
<description>some awesome feed.</description>
<copyright>Copyright 1995-3001</copyright>
<itunes:author>John Doe</itunes:author>

Keybase proof

I hereby claim:

  • I am drmohundro on github.
  • I am drmohundro ( on keybase.
  • I have a public key ASDfnjmOHn27rh_MABD4tr3t-bugI4x2mzGyBU82z3pxzgo

To claim this, I am signing this object:

drmohundro / private.xml
Last active Sep 21, 2017
Karabiner private.xml to swap option and command keys for Parallels
View private.xml
<?xml version="1.0"?>
drmohundro / for-each-db-example.sql
Created Jan 4, 2017
T-SQL sp_msforeachdb example
View for-each-db-example.sql
EXEC sp_msforeachdb '
if ''?'' LIKE ''CMS[_]%'' begin
print ''?'';
use [?]
select setting as TransactionGateway, ''?'' as [Database]
from dbo.Setting with(nolock)
where Id = ''TransactionGateway''
drmohundro / has-more-than-one-example.sql
Created Jan 4, 2017
T-SQL Has More Than CTE Example
View has-more-than-one-example.sql
; WITH ForImport AS (
,vd.account AS CreditCardOrAch
,vd.account_expiration AS Expires
,vd.routing AS Routing
,vd.address1 AS Address1
,vd.address2 AS Address2
, AS City
drmohundro / backup-example.sql
Last active Jan 4, 2017
Backup and Restore Database Examples (T-SQL)
View backup-example.sql
BACKUP DATABASE MyDb TO DISK = 'C:\sql-backups\MyDb-20151119.bak' WITH INIT
You can’t perform that action at this time.