Skip to content

Instantly share code, notes, and snippets.

View jimdiroffii's full-sized avatar
🏠
Working from home

Jim Diroff II jimdiroffii

🏠
Working from home
View GitHub Profile
@jimdiroffii
jimdiroffii / set-default-printer-windows.vbs
Created September 14, 2020 14:57
Map network printers and set default printer in Windows 7
Option Explicit
Dim objNetwork, strLocal
Dim strUNCPrinter1
Dim strUNCPrinter2
Dim strUNCPrinter3
Dim strUNCPrinter4
Dim strUNCPrinter5
Dim strUNCPrinter6
@jimdiroffii
jimdiroffii / flask-dev-startup.script
Created September 14, 2020 14:53
Bash script for setting up and starting a Flask application development server
#! /bin/bash
export FLASK_APP=application.py
export FLASK_DEBUG=1
export FLASK_ENV=development
export FLASK_TESTING=True
flask run --host=0.0.0.0
@jimdiroffii
jimdiroffii / remove-empty-dirs-tail-recurse.ps1
Last active September 14, 2020 14:50
PowerShell Tail Recursion for Removing Empty Directories
$tailRecursion = {
param($Path)
foreach ($childDirectory in Get-ChildItem -Force -LiteralPath $Path -Directory) {
& $tailRecursion -Path $childDirectory.FullName
}
$currentChildren = Get-ChildItem -Force -LiteralPath $Path
$isEmpty = $currentChildren -eq $null
@jimdiroffii
jimdiroffii / gettrustedhosts.ps1
Last active August 5, 2020 02:17
[Powershell - Check Trusted Hosts] Print the contents of the TrustedHosts file #powershell
Get-Item WSMan:\localhost\Client\TrustedHosts