Skip to content

Instantly share code, notes, and snippets.

@shanselman
shanselman / copilot-cli-oh-my-posh-statusline.md
Last active October 2, 2026 18:57
Use Oh My Posh for the GitHub Copilot CLI statusline

Use Oh My Posh for the GitHub Copilot CLI statusline

GitHub Copilot CLI has an experimental statusline feature that can run a local command and render the command's output at the bottom of the Copilot terminal UI.

If you already use Oh My Posh, you can use the same engine, colors, and segments to render a Copilot-aware statusline in a few minutes.

This guide shows a Windows + PowerShell setup, but the idea is portable:

  1. Copilot calls a local script.
  2. Copilot sends session state to the script as JSON on stdin.
  • Shall i implement it?
  • No ...
@mhrastegari
mhrastegari / BlazorLongPressSample.razor
Last active December 12, 2024 22:13
Long press sample for Blazor
<div style="
width: 150px;
height: 150px;
display: grid;
align-content: center;
justify-content: center;
border: 2px solid dodgerblue;"
@onpointerdown="PointerDown"
@onpointerup="PointerUp">
@Text
@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active July 25, 2026 21:11
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@HonbraDev
HonbraDev / remove.sh
Last active June 3, 2026 14:06
Ubuntu Server 20.04 LTS Firefox kiosk
# Stop the kiosk service
sudo systemctl stop kiosk
# Remove the kiosk service from startup
sudo systemctl disable kiosk
# Remove the kiosk service
sudo rm -f /etc/systemd/system/kiosk.service
# Reload systemctl daemons
#pragma warning disable MA0048 // File name must match type name
#define INTERNAL_NULLABLE_ATTRIBUTES
#if NETSTANDARD2_0 || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NET45 || NET451 || NET452 || NET46 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48
// https://github.com/dotnet/corefx/blob/48363ac826ccf66fbe31a5dcb1dc2aab9a7dd768/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
@bityob
bityob / Enable-OpenSSH-Client-Server-On-Windows.md
Last active August 25, 2026 15:57
Enable SSH Client/Server with OpenSSH on Windows

How to enable ssh on Windows?

Tested on Windows Version 10.0.17755.1

  • Run cmd as admin

  • Install OpenSSH.Client - dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0

C:\WINDOWS\system32&gt;dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0
@tygor
tygor / Deploy-SquirrelApp.ps1
Last active June 10, 2020 22:19
Squirrel.Windows Powershell Releasify script
<#
.Synopsis
Packs and deploys a Squirrel.Windows app
.DESCRIPTION
Nuget Pack and Squirrel.Windows Releasify. The parameters taken will then run the --signWithParams flag which signs your executables with the given certificate.
.EXAMPLE
Deploy-SquirrelApp -NuSpec C:\Temp\MyApp.nuspec -OutputDir .\bin\Release\ -ReleaseDir C:\Network\Folder\ -CertificatePath .\Certificate.pfx
#>
function Deploy-SquirrelApp {
[CmdletBinding()]
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active November 18, 2026 05:00
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com