Skip to content

Instantly share code, notes, and snippets.

Greg MacLellan gregmac

Block or report user

Report or block gregmac

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
gregmac /
Last active Oct 2, 2019
.NET FIPS test

FIPS testing

FIPS mode on




gregmac / $PROFILE\Microsoft.PowerShell_profile.ps1
Last active Jul 3, 2019
PowerShell Set-WindowTitle profile config
View $PROFILE\Microsoft.PowerShell_profile.ps1
# Import posh-git (if installed via scoop)
$poshGitModule = "$HOME\scoop\apps\posh-git\current\posh-git.psd1";
if (Test-Path $poshGitModule) { Import-Module $poshGitModule }
# msbuild convenience alias
Set-Alias MSBuild 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe'
# bash-style completion
Set-PSReadlineKeyHandler -Key Tab -Function Complete
#Set-PSReadlineOption -ShowToolTips
View tailblazer.json
"homepage": "",
"version": "",
"license": "GPL-3.0-only",
"url": "",
"hash": "53341485375b0a9ebd4085dbafa71c68af9a2044ff1bb65f3300be4b43f6c11c",
"bin": "TailBlazer.exe",
"shortcuts": [
gregmac / winaero-tweaker.json
Created Jan 23, 2019
Winaero Tweaker manifest for Scoop
View winaero-tweaker.json
"homepage": "",
"license": "Freeware",
"description": "Tweaks and hidden settings for power-users for Windows 7/8/8.1/10",
"version": "0.12.1",
"url": "",
"hash": "359aeda5a637cfd6010810b11ac6a0b582ff3b7b9e361334d13e619e4ef4d6c2",
"innosetup": true,
"bin": "WinaeroTweaker.exe",
"shortcuts": [
gregmac / winsshterm.json
Last active Jan 24, 2019
WinSSHTerm Manifest for Scoop
View winsshterm.json
"homepage": "",
"license": {
"identifier": "Freeware",
"url": ""
"description": "A tabbed SSH solution for Windows, combining PuTTY/KiTTY, WinSCP and VcXsrv",
"version": "2.4.1",
"url": "",
"extract_dir": "WinSSHTerm",
View VisualStudio


  • Git Diff Margin - Show git diff in the margin, and allow reverting
  • Mouse Navigation - Use mouse forward/back buttons
  • Spell Checker - Find and fix typos and speling mistaeks in both code and comments
  • NoMorePanicSave - Auto "save all" on focus lost -- such as when you go to your git client -- which means you don't forget to check in your latest changes or modifications to the proj/sln files
  • Power Commands - Mostly for "Collapse all projects" and "Open explorer window"
  • SmartPaster2019 -
gregmac /
Last active Apr 27, 2018
LetsEncrypt certificate issuance notes

Some random tests of certbot (0.22) behaviour, as part of an effort to script its usage.


  • * DNS points at this server, so HTTP-01 auth works.
  • CERTBOT_PARAMS=" --test-cert --email --agree-tos --webroot --webroot-path /var/www/html --non-interactive"

Add a domain, without --expand

certbot certonly $CERTBOT_PARAMS --domains

This is just random things I've come across that are not well known, but useful, and I'd like to remember.

Shout outs to where I probably found most/all of these.

  • psr.exe - Screen steps recorder
  • Win+Shift+S - Snipping tool
  • Reliablity Monitor - Fast troubleshooting tool
  • |clip - Pipe output of commands to clipboard
View FriendlyPasswordGenerator.cs
using System;
using System.Globalization;
using System.Security.Cryptography;
/// <summary>
/// Generates human-friendly and easily remembered passwords such as "RelevantLecture!217"
/// or "AirlineCoffee$538".
/// Existing word set generates nearly 1.3 billion possible passwords.
/// </summary>
gregmac / CopyPaste.ps1
Last active Apr 24, 2017
Find RaspberryPi's on local network from Windows
View CopyPaste.ps1
# Powershell script
$nic=gwmi -computer . -class "win32_networkadapterconfiguration"|Where-Object{$_.defaultIPGateway -ne $null}
$IP=$nic.ipaddress|select-object -first 1;$Mask=$nic.ipsubnet|select-object -first 1;$IPInt=([Net.IPAddress]$IP).Address;$MaskInt=([Net.IPAddress]$Mask).Address;$start=($IPInt -band $MaskInt);$end=($IPInt -bor(-bnot [uint32]$MaskInt))-16777216;
Write-Host "Scanning $IP/$Mask...";while($start -lt $end){$start += 16777216;Test-Connection (new-object System.Net.IPAddress $start).ToString() -Count 1 -AsJob|Out-Null};Start-Sleep 1;
Write-Host "Looking up hostnames..";Get-NetNeighbor|Where-Object{$_.LinkLayerAddress.StartsWith("B8-27-EB")}|ForEacH { [PSCustomObject]@{IP = $_.IPAddress; MAC = $_.LinkLayerAddress; Host = [System.Net.Dns]::GetHostByAddress($_.IPAddress).HostName}}
You can’t perform that action at this time.