Skip to content

Instantly share code, notes, and snippets.

View kevduc's full-sized avatar
📙
Focusing

Kevin Duconge kevduc

📙
Focusing
View GitHub Profile
@kevduc
kevduc / ExtractIcon.ps1
Last active September 20, 2021 14:33
Extract the icon of an exe file using PowerShell
# Based on https://community.spiceworks.com/topic/592770-extract-icon-from-exe-powershell
[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing') | Out-Null
[System.Drawing.Icon]::ExtractAssociatedIcon('full-path-to/file.exe').ToBitmap().Save('full-path-to/icon.ico')
const measure = (f, sampleSize, ...args) => {
const start = Date.now()
for (let i = 0; i < sampleSize; i++) f(...args)
return (Date.now() - start) / sampleSize
}
const perfDiff = (value1, value2) => (100 * (value1 - value2)/value1).toFixed(2) + '%'
const callback = (_,i) => i