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>
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}}
View uninstall-mssql.ps1
# Powershell script to uninstall all Microsoft SQL Server stuff.
# There's so many entries it's a pain to uninstall everything manually. Run via PowerShell (or PowerShell ISE) as Admin.
# Warning: this still prompts for confirmation on a bunch of items.
$uninstall32 = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "SQL Server" } | select DisplayName,UninstallString
$uninstall64 = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "SQL Server" } | select DisplayName,UninstallString
$uninstall = $uninstall32 + $uninstall64 | where {$_.UninstallString -match "MsiExec"} | Sort DisplayName
View gist:43124c78a8a5c4866bbd0ccf9821fe77
### Keybase proof
I hereby claim:
* I am gregmac on github.
* I am gregmac ( on keybase.
* I have a public key ASBOl8fdnaaIZeRYR8GqeKB2oBereEq6at1bjvcDvYHzVwo
To claim this, I am signing this object:
View reclaimWindows10.ps1
# Run as admin:
# (New-Object System.Net.WebClient).DownloadString("") | iex
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <>
# Modified by: alirobe <> based on my personal preferences.
View NullCheckExtensions.cs
public static class NullCheckExtensions
public static bool IsNullOrEmpty(this string value) => string.IsNullOrEmpty(value);
public static bool IsNullOrWhitespace(this string value) => string.IsNullOrWhiteSpace(value);
public static bool IfNotNull<T>(this T value, Action<T> trueAction)
if (value == null) return false;
View usermacro.html
## Macro title: UML Sequence Diagram
## Macro has a body: Y
## Body processing: Unrendered
## This macro allows use of js-sequence-diagrams from
## Developed by: Greg MacLellan
## Date created: 2015-09-15
## 2015-09-21: Added suppor for displaying parse errors while rendering
## Installed by: Greg MacLellan
View gist:977437ce7fd49d7a0475

For my own reference, settings that are necessary to make Windows 8/8.1 nice.

Start menu

StartIsBack or Start8. Either work, and this is absolutely essential.

Disable forced auto-update

This inevitably happens during something important. Glad to see MS forces updates -- but... I will restart when I restart.

View signtool.msbuild.tasks
Sign .exe files using signtool.exe.
(c) 2014 Greg MacLellan, Licensed under MIT
* Hides password from being displayed in build output
* Retries against multiple timestamp servers if the server returns an invalid response (fairly common)
View jira-paste-tablizied.js
Listens for a paste event into a JIRA wiki textarea
If there is at least one tab and newline in the pasted text,
and then every line contains the same number of tabs,
it is turned into a table using JIRA wiki markup syntax.
By Greg MacLellan, 2014-04-09. BSD License.
jQuery('').live('paste', function() {
var self = jQuery(this);
var originalText = self.val();