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
$a = @{} | |
$b = New-Object hashtable | |
$a['a'] = 1 | |
$a['A'] = 2 | |
$b['a'] = 1 | |
$b['A'] = 2 | |
$a | |
# Name Value | |
# ---- ----- |
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
git diff --name-only <commit> HEAD --diff-filter=CMART | gi | %{ $_.LastWriteTime = [datetime](git log --pretty=format:%ci --max-count=1 $_.FullName) } |
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
$apkfiles = gci D:\Android\data\com.think_android.appmanagerpro\files\appmonster3\backup\*\rev\*.apk | |
$deletedlist = New-Object System.Collections.Generic.List[string]; | |
$apkgrp | %{ | |
$targets = $_.Group | |
$filessorted = $targets | ?{ $_.Length -NE 0 } | sort { [long][System.IO.Path]::GetFileNameWithoutExtension($_.Name) }; | |
$saved = @(); | |
$saved += $filessorted | select -First 1; | |
$saved += $filessorted | group { [System.Math]::Floor([System.Math]::Log10( [long][System.IO.Path]::GetFileNameWithoutExtension($_.Name) )) } | %{ $_.Group | select -Last 1; }; | |
$targets -notcontains $saved; |
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
start /MIN powershell -File "%~dpn0.ps1" |
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 baseElm = $0; | |
document.addEventListener('copy', (e) => { | |
e.preventDefault(); | |
e.clipboardData.setData('text/plain', baseElm.closest('div.page').querySelector('canvas').toDataURL('image/png')); | |
console.log('png image copied!'); | |
}, { once: true }); | |
})(); |
NewerOlder