Skip to content

Instantly share code, notes, and snippets.

View DevToolsSnippets.js
// Dump all links on a page to a text file, may need to disable adblock temporarily"data:text/csv;charset=utf-8," + encodeURIComponent(Array.from(document.links).map(e=>e.href).join("\n")))
View PSTitleTetris.ps1
$blocks = @()
$blockChain = @()
#$blocks += New-Object -TypeName psobject -Property @{c = [char]0x2597; s=@(0,0,0,1); w=3}
#$blocks += New-Object -TypeName psobject -Property @{c = [char]0x259d; s=@(0,1,0,0); w=2}
$blocks += New-Object -TypeName psobject -Property @{c = [char]0x2599; s=@(1,0,1,1); w=4}
$blocks += New-Object -TypeName psobject -Property @{c = [char]0x259b; s=@(1,1,1,0); w=3}
$blocks += New-Object -TypeName psobject -Property @{c = [char]0x259c; s=@(1,1,0,1); w=3}
$blocks += New-Object -TypeName psobject -Property @{c = [char]0x259f; s=@(0,1,1,1); w=3}
$blocks += New-Object -TypeName psobject -Property @{c = [char]0x258d; s=@(0,0,1,1); w=2}
mdjx / gist:2822c26977dea24d0baa3aaf7744c177
Last active Mar 23, 2020
Output Veeam Jobs with target repository and total backup size per job
View gist:2822c26977dea24d0baa3aaf7744c177
Get-VBRJob | select Name, @{N="Repository";E={$_.GetTargetRepository().Name}}, @{N="TotalSize"; E={[Math]::Round(((Get-VBRBackup -Name $_.Name | Sort-Object {$_.LastPointCreationTime -As [DateTime]} -Descending | Select -First 1).GetAllStorages().Stats.BackupSize | Measure-Object -Sum).Sum / 1Gb,2)}}
mdjx / gist:c2164f3ef168e83ecb83a0b62afbed91
Last active Mar 23, 2020
COVID-19 Case Numbers in Australia per State
View gist:c2164f3ef168e83ecb83a0b62afbed91
((iwr "").ParsedHtml.getElementsByClassName("health-table__responsive")[0].outerText -replace(',','') -replace ('\d{1,}',',$0') -split ('\n')).trim()[1..9] | ConvertFrom-Csv -Header "State","Cases"