Log Locations for several apps, in one place. Started: 2024-07
See LogPaths.yml
Log Locations for several apps, in one place. Started: 2024-07
See LogPaths.yml
function resolveAfterDelay(x, ms) { | |
// async invoke after x milliseconds | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
resolve(x); | |
}, ms ?? 200 ); | |
}); | |
} | |
async function f1() { |
function fnSync ( params ) { | |
// some Sync function that returns something | |
console.log( `🟠 fnSync => exit: ${ params }` ) | |
return `[ SyncResult: ${ params } ]` // renders nicer in the log than | |
// return { syncResult: 'didStuff', params: params } | |
} | |
function fnAsync ( params ) { | |
// now it's async | |
return new Promise( ( resolve ) => { | |
console.log( `🟢 fnAsync => enter: ${ params }` ) |
# Here's tiny clipboard sugar for a profile | |
# context: there was a thread about creating a custom clipboard uri, and clipboard cmdlets | |
# <https://discord.com/channels/180528040881815552/447476117629304853/1260981998479081562> | |
Import-Module Pansies | |
# It's nice to get a confirmation that your clip was saved | |
$PSDefaultParameterValues['Set-ClipBoard:PassThru'] = $true | |
Set-alias 'cl' 'Set-ClipBoard' # 'sc' already exists | |
Set-Alias 'gcl' 'Get-Clipboard' |
using namespace System.Collections.Generic | |
# Say you want one table that has all results, with fixed columns | |
[list[Object]]$Summary = @() | |
# and a second array that's just errors with extra info | |
[list[Object]]$ErrorSummary = @() | |
foreach( $user in $UserCsv ) { | |
$result = [pscustomobject]@{ |
/* | |
I use these a lot to fix paths in files for github, like markdown links. | |
*/ | |
{ | |
"🐒🦍path: Wraps selected text with a file uri": { | |
"prefix": "insertFileUrl fileUrl", | |
"description": "🦍 wraps selected text with a file url like: <file:///foo.txt> . Note: Currently wraps, does not convert spaces", | |
"body": [ | |
"<file:///${TM_SELECTED_TEXT:foobar.txt}>$0" | |
] |
{ | |
/* | |
Power BI: | |
for TMDL syntax highlighting in VS Code: https://marketplace.visualstudio.com/items?itemName=analysis-services.TMDL | |
where to find schemas | |
- [1] https://github.com/microsoft/powerbi-desktop-samples/tree/main/item-schemas | |
- [2] https://github.com/microsoft/powerbi-desktop-samples/tree/main/Report%20Theme%20JSON%20Schema | |
More links related to PBIR/PBIP/tmdl and schemas |
filter MdFormat-EscapePath { | |
<# | |
.SYNOPSIS | |
make safe markdown style links. convert paths to work as urls and console clickable urls like: <file:///{0}>' | |
.example | |
> 'dir\some Item.md' | MdFormat-EscapePath | |
dir/some%20Item.md | |
#> | |
$_ -replace ' ', '%20' -replace '\\', '/' |