This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#From https://www.deployhq.com/git/faqs/removing-large-files-from-git-history | |
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch path/to/file' --prune-empty --tag-name-filter cat -- --all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://stackoverflow.com/questions/29066742/watch-file-for-changes-and-run-command-with-powershell | |
$folder = "C:\Users\LOCAL_~1\AppData\Local\Temp\3" | |
$filter = "*.log" | |
$destination = "C:\Users\Documents" | |
$Watcher = New-Object IO.FileSystemWatcher $folder, $filter -Property @{ | |
IncludeSubdirectories = $false | |
NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder