Skip to content

Instantly share code, notes, and snippets.

View TylerLeonhardt's full-sized avatar

Tyler James Leonhardt TylerLeonhardt

View GitHub Profile
@TylerLeonhardt
TylerLeonhardt / exthostauth.test.ts
Created October 16, 2021 01:35
tests I'm trying to get working
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { DisposableStore } from 'vs/base/common/lifecycle';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { TestDialogService } from 'vs/platform/dialogs/test/common/testDialogService';
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
@TylerLeonhardt
TylerLeonhardt / Dockerfile
Last active July 30, 2020 18:42
A non-interactive start up of vso hosted agent
FROM mcr.microsoft.com/powershell:latest
RUN apt-get update && apt-get install wget
COPY LICENSE README.md /
COPY install-vso.sh /install-vso.sh
RUN sh /install-vso.sh
COPY entrypoint.ps1 /entrypoint.ps1
ENTRYPOINT ["pwsh", "-Command", "/entrypoint.ps1"]
@TylerLeonhardt
TylerLeonhardt / survivordays-organize.ps1
Created July 8, 2020 19:08
A script I used to organize videos
#param(
$RootPath = "/Users/tyleonha/Desktop/SurvivorDays"
#)
$movies = Get-ChildItem $RootPath -File
$folders = [System.Collections.Generic.List[string]]@(
"placeholder since index 0 is the 'new folder' option"
)
$title = "Choice prompt"
$whichFolder = "Which folder would you like to put this in?"
@TylerLeonhardt
TylerLeonhardt / container-action.md
Last active July 2, 2020 17:01
Creating a Docker Action (PowerShell Edition)
@TylerLeonhardt
TylerLeonhardt / add-super-duper-linter.ps1
Last active June 28, 2020 20:37
Add JustinGrote/Super-Duper-Linter to all GitHub repos! - depends on Microsoft/PowerShellForGitHub
#Requires -Modules PowerShellForGitHub
# Change this to you:
$owner = 'TylerLeonhardt'
# This will ignore forks
Get-GitHubRepository -OwnerName $owner -Sort Pushed | Where-Object fork -ne $true | ForEach-Object {
# Clone the repo and move into it
$item = New-Item -ItemType Directory -Path "Temp:/$(New-Guid)/$($_.name)"
git clone $_.ssh_url $item.FullName
@TylerLeonhardt
TylerLeonhardt / Marienbruecke.go
Last active May 11, 2020 21:42
bridge TCP and Unix domain sockets written in Go!
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"os"
"strings"
@TylerLeonhardt
TylerLeonhardt / CurrentDirectory.ps1
Last active April 21, 2020 18:54
Set `cwd` when the location changes in PowerShell!
# Set CurrentDirectory when LocationChangedAction is invoked.
# This allows iTerm2's "Reuse previous session's directory" to work
$ExecutionContext.SessionState.InvokeCommand.LocationChangedAction += {
[Environment]::CurrentDirectory = $pwd.Path
}
@TylerLeonhardt
TylerLeonhardt / azure-pipelines-style.yml
Last active April 23, 2020 01:13
Put this script in a `PowerShell` task in your Azure Pipelines YAML and the `PowerShell` task will use the daily build of PowerShell!
steps:
- powershell: |
Write-Host "Installing PowerShell Daily..."
# Use `AGENT_TEMPDIRECTORY` to make sure the downloaded PowerShell is cleaned up.
$powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell'
Invoke-WebRequest -Uri https://aka.ms/install-powershell.ps1 -OutFile ./install-powershell.ps1
./install-powershell.ps1 -Destination $powerShellPath -Daily
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TylerLeonhardt
TylerLeonhardt / Sleepin' by Relient K
Last active March 19, 2020 03:04
Ukulele tab/chord sheets - paste them into: http://ukegeeks.com/songeditor and hit "Update"
{title: Sleepin' }
{artist: Relient K }
{define: C/D frets 0 2 0 3 fingers 0 1 0 2}
{comment: Intro}
{comment: Tab 1}
{sot}
A|---------0---------0------7\-0---|---------0---------0-------------|
E|-3---3/5-------5/7---------------|-3---3/5-------5/7-------5\3-0-3-|