Skip to content

Instantly share code, notes, and snippets.

@romero126
romero126 / WinTerm Image
Created June 12, 2020 17:15
Windows Terminal
function Get-WTSettingsPath {
# Determine if we are in WT
$Profile = $env:WT_PROFILE_ID
if (!$Profile)
{
throw "WT Not available"
}
$SettingsPath = Get-Item "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal*\LocalState\" | Select-Object -ExpandProperty FullName
$SettingsPath
@romero126
romero126 / Powershell Function to C# Function
Last active February 14, 2021 01:38
Convert-ToCSharp
function Convert-ToCSharp
{
param(
[Parameter(Mandatory)]
[System.String]$Path,
[Parameter(Mandatory)]
[System.String]$OutFile
class foo {
private _bar:boolean = false;
get bar():boolean {
return this._bar;
}
set bar(theBar:boolean) {
this._bar = theBar;
}
}