This file contains 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
#requires -Modules @{ModuleName='PwshSpectreConsole'; ModuleVersion='2.1.2'}, @{ModuleName='PSBlueSky'; ModuleVersion='0.6.0'} | |
# REQUIRES WINDOWS TERMINAL PREVIEW 1.22+ FOR SIXEL https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-22-release/ | |
# Or another sixel capable terminal emulator but I've only tested on Windows Terminal Preview so far | |
# REQUIRES BLUE SKY CREDS TO BE SETUP | |
$timeline = Get-BskyTimeline -Limit 15 | |
$formattedPosts = @() | |
foreach ($post in $timeline) { |
This file contains 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
<# | |
My rambling notes from trying to understand sixels and how to use them in Windows Terminal. | |
I read up on a bunch of github issues, https://vt100.net/shuford/terminal/all_about_sixels.txt and wikipedia sixels pages | |
Each vertically stacked "pixel" in a sixel has a value to the power of 2 starting with 1 and ending at 32. | |
[*] 1 = 2^0 | |
[*] 2 = 2^1 | |
[*] 4 = 2^2 |
This file contains 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
#Requires -Modules @{ ModuleName = 'PwshSpectreConsole'; RequiredVersion = '2.1.1' } | |
Set-SpectreColors -AccentColor DeepPink1 | |
# Build root layout scaffolding for: | |
# .--------------------------------. | |
# | Title | <- Update-TitleComponent will render the title | |
# |--------------------------------| | |
# | | <- Update-MessageListComponent will display the list of messages here | |
# | | |
This file contains 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
#Requires -Modules @{ ModuleName = 'PwshSpectreConsole'; RequiredVersion = '2.1.0' } | |
Set-SpectreColors -AccentColor BlueViolet | |
# Build root layout scaffolding for: | |
# .--------------------------------. | |
# | Header | | |
# |--------------------------------| | |
# | File List | Preview | | |
# | | | |
This file contains 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
using namespace System.Management.Automation.Subsystem.Feedback | |
using namespace System.Management.Automation.Subsystem | |
using namespace System.Threading | |
param ( | |
# Just unregister the implementation | |
[switch] $UnregisterOnly | |
) | |
class TestingFeedback : IFeedbackProvider { |
This file contains 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
# Do some work | |
Write-Host "Doing some work" | |
$job = Start-Job { | |
Start-Sleep -Seconds 5 | |
} | |
# Spinner | |
$location = $Host.UI.RawUI.CursorPosition | |
$spinnerIcons = @(". ", ".. ", "...") | |
$spinnerIconIndex = 0 |
This file contains 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
#requires -Version 7 | |
function Invoke-GithubCodeSearchLogin { | |
param ( | |
[Parameter(Mandatory)] | |
[string] $Username, | |
[Parameter(Mandatory)] | |
[securestring] $Password | |
) | |
Write-Verbose "This requires cookies across multiple domains so we're using a session like a web browser to keep state" |