Skip to content

Instantly share code, notes, and snippets.

@Hugoberry
Hugoberry / UnicodeMicrocharts.dax
Created March 18, 2021 23:19
Exploring displaying microcharts and sparklines in table/matrix visual in PowerBI
Spark = {
("Bar chart 100%","⬛⬛⬛⬛⬛⬛⬜⬜⬜⬜"),
("Bar chart 1","▧▧▧▧▧▧▧▧▧"),
("Bar chart 2","▧▧▧"),
("Bar chart 3","▧▧▧▧▧▧▧"),
("Stacked bar chart 1","▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░"),
("Bullet chart","█████████▒▒▒▒▒▒▒▒▒│▒▒"),
("Win loss 1","▖▗▘▘▗▘▘▞"),
("Win loss 2","▀▄▄▄▀▄▀▄▀▀▄▀▄▄▀▄▄▀▄▀"),
("Comparative Horizontal Circle 1","○○●●●●●●●|○○○○○○○○○○○"),
@ninmonkey
ninmonkey / A cheat sheet - VS Code, Wt, etc config file locations.md
Last active July 13, 2022 08:19
cheat sheet - VS Code, Wt, etc config files

Windows 10

App Note Path
VS Code Global config $Env:APPDATA\Code\User\Settings.json
VS Code - Insiders Global config $Env:APPDATA\Code - Insiders\User\Settings.json
VS Code Extensions Dir $env:UserProfile\.vscode\extensions
Wt Preview see Get-WindowsTerminalProfile.ps1 $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\settings.json
@jborean93
jborean93 / Get-ExtendedAttribute.ps1
Created April 14, 2021 22:26
Gets extended attributes for a file on an NTFS volume
# Copyright: (c) 2021, Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
class EncodingTransformAttribute : Management.Automation.ArgumentTransformationAttribute {
[object] Transform([Management.Automation.EngineIntrinsics]$engineIntrinsics, [object]$InputData) {
$outputData = switch ($InputData) {
{ $_ -is [Text.Encoding] } { $_ }
{ $_ -is [string] } {
switch ($_) {
@jborean93
jborean93 / Start-ProcessEx.ps1
Last active June 27, 2024 06:20
PowerShell wrapper around CreateProcess that exposes more low level items
# Copyright: (c) 2021, Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
using namespace System.Management.Automation
using namespace System.Management.Automation.Host
using namespace System.Runtime.InteropServices
$typeParams = @{
TypeDefinition = @'
using Microsoft.Win32.SafeHandles;

Collapsing Example

Summary (Click to Expand) tl;dr
🐒> ls . 

full code below

@ninmonkey
ninmonkey / Export Format-Data.ps1
Last active April 12, 2022 09:57
format.ps1xml example : file list
$APP_PATH_ROOT = Get-Item -ea stop $PSScriptRoot
function _exportFormatData {
<#
.synopsis
export formatting and generate file to load from if not existing
#>
param(
# typename
[Parameter(mandatory, valuefromPipeline)]
@Hugoberry
Hugoberry / list-cheat-sheet.md
Last active April 16, 2022 21:39
PowerQuery list functions cheat sheet

List functions

Addition

List.Sum({1, 2, 3}) ⇒ 6

Averages

List.Average({3, 4, 6}) ⇒ 4.333333333333333
List.Mode({"A", 1, 2, 3, 3, 4, 5}) ⇒ 3
List.Modes({"A", 1, 2, 3, 3, 4, 5, 5}) ⇒ {3,5}