Skip to content

Instantly share code, notes, and snippets.

View colinMac's full-sized avatar

Colin MacDonald colinMac

  • YGM Solutions
  • Atlanta
View GitHub Profile
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,5b,e0,1d,00,5c,e0,1d,e0,1d,00,5b,e0,1d,e0,5c,e0,00,00,00,00
@colinMac
colinMac / ImgToBase64.ps1
Created May 10, 2017 16:15
Powershell script to convert an image to base64 data uri format and store in a text file
Param([String]$path)
[bool]$valid = ($path -ne "")
if($valid) {
[String[]]$elements = $path.split(".")
[int]$max = $elements.Count -1
[String]$ext = $elements[$max]
[String]$uri = "data:image/$($ext);base64,"
$elements[$max] = "txt"
[String]$txtPath = $elements -join "."