Skip to content

Instantly share code, notes, and snippets.

View zadjii-msft's full-sized avatar
👶
On paternity. Back... hopefully soon.

Mike Griese zadjii-msft

👶
On paternity. Back... hopefully soon.
View GitHub Profile
@zadjii-msft
zadjii-msft / Add-GitHubBetaProjectItem.ps1
Last active August 23, 2022 15:58
Used for loading all our tasks & bugs into our project
# blatantly copied and hacked back together from PsGithub
$betaProjectItemFragment = Get-Content -Raw "$PSScriptRoot/BetaProjectItemFragment.graphql"
function Add-GitHubBetaProjectItem {
<#
.SYNOPSIS
EXPERIMENTAL: Adds an item to a GitHub project (Beta).
#>
[CmdletBinding()]
@zadjii-msft
zadjii-msft / win32-input-decoder.py
Created September 9, 2022 14:42
Used for decoding win32 input records
import sys
vkey_table = {
0x01: "VK_LBUTTON", # "Left mouse button"
0x02: "VK_RBUTTON", # "Right mouse button"
0x03: "VK_CANCEL", # "Control-break processing"
0x04: "VK_MBUTTON", # "Middle mouse button (three-button mouse)"
0x05: "VK_XBUTTON1", # "X1 mouse button"
0x06: "VK_XBUTTON2", # "X2 mouse button"
@zadjii-msft
zadjii-msft / InputCore.wprp
Created November 9, 2022 16:52
Collect an input trace
<?xml version="1.0" standalone='yes'?>
<!--
This profile is meant for general-purpose tracing of the input stack.
Please contact the pointingdev alias with any questions or update requests,
so that the corresponding UIF profile can be updated at the same time.
-->
<WindowsPerformanceRecorder
Version="1.0"
@zadjii-msft
zadjii-msft / README.md
Last active March 27, 2023 18:19
Terminal 1.18 Selfhost Settings

Terminal 1.18 Selfhost Settings

Collection of settings for our 1.18 bug bash. Last updated for 1.18.833

There's also a collection of files for your shell config as well. I made them all separate, especially the pwsh ones, so people could combine as needed. I know folks have complicated shell prompts already. The one I have there is fairly trivial, but should include all the marks you need to get started. Wrap your own prompt as needed.

Shell-completion integration

Make sure that the key in Set-MappedKeyHandlers matches the contents of the sendInput command bound in the actions. In this sample, the Terminal internally passes F12b to pwsh to drive the menu.

@zadjii-msft
zadjii-msft / scratch.cpp
Created March 24, 2023 14:21
Listen for console screen buffer size changes
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include <windows.h>
#include <stdio.h>
// WIL
#include <wil/Common.h>
#include <wil/Result.h>
#include <wil/nt_result_macros.h>
@zadjii-msft
zadjii-msft / community-prs.ps1
Created May 18, 2023 16:33
Make a graph of terminal PRs
$prs=Get-GitHubPullRequest -RepositoryName terminal -owner Microsoft -State closed
$wtprs=$prs | ? { $_.merged_at -ne $null -and $_.merged_at -gt ([datetime]"May 1, 2019") }
$wtprs | group { "{0}-{1}" -f ($_.created_at.year, $_.created_at.month) }
function was-microsoft($_) { $_.user.Login -In @("leonMSFT", "cinnamon-msft", "PankajBhojwani", "miniksa", "DHowett-MSFT", "carlos-zamora", "lhecker", "DHowett", "zadjii-msft") }
# Make a cool proportional graph of merged PRs
@zadjii-msft
zadjii-msft / README.md
Last active September 4, 2024 09:07
Warp Workflows for the Windows Terminal

Add all the Warp Workflows to Windows Terminal

With a combination of features all available in Windows Terminal 1.22, you can now add all your favorite Warp Workflows directly to the Windows Terminal.

image image

This works by adding the workflows to your settings via a "settings fragment". You can then open a menu with all these workflows with the openSuggestions action.