Skip to content

Instantly share code, notes, and snippets.

@stuartleeks
stuartleeks / Visual Studio Code - Dark.ps1xml
Created July 1, 2015 12:44
Powershell ISE theme - VS Code Dark
<?xml version="1.0" encoding="utf-16"?>
<StorableColorTheme xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Keys>
<string>ErrorForegroundColor</string>
<string>ErrorBackgroundColor</string>
<string>WarningForegroundColor</string>
<string>WarningBackgroundColor</string>
<string>VerboseForegroundColor</string>
<string>VerboseBackgroundColor</string>
<string>DebugForegroundColor</string>
@stuartleeks
stuartleeks / ci.md
Last active October 3, 2022 07:30
TRE notes

CI notes

status

Current status

  • /test runs build for forks
    • gets secret
  • does NOT mark the tests as completing
@stuartleeks
stuartleeks / ImportAzureVmsIntoRdcMan-2.ps1
Last active June 3, 2022 19:53
PowerShell script to create a Remote Desktop Connection Manager configuration file for all Windows Azure Virtual Machines and PaaS role instances in a subscription.Requires Azure PowerShell cmdlets: http://www.windowsazure.com/en-us/documentation/articles/install-configure-powershell/. See this blog post for more information: http://blogs.msdn.c…
$rdcmanName = "Azure VMs"
$outputFileName = Get-Location | Join-Path -ChildPath "AzureVMs.rdg"
$xml = [xml]'<?xml version="1.0" encoding="utf-8"?>
<RDCMan programVersion="2.7" schemaVersion="3">
<file>
<credentialsProfiles />
<properties>
<expanded>True</expanded>
<name>Azure VMs</name>
@stuartleeks
stuartleeks / README.md
Last active February 8, 2022 14:42
ghrun.sh

Accompanying scripts for https//stuartleeks/posts/wsl-github-cli-windows-notifications-part-2/

Abbreviated setup notes

Enjoy!

@stuartleeks
stuartleeks / .gitconfig
Last active November 22, 2021 08:32
My notes for my .gitconfig
[core]
editor = code --wait
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
[alias]
amendcommit = "!git commit --amend --reuse-message \"$(git rev-parse --abbrev-ref HEAD)\""
branches = branch -a --color -v
wip = !git add -A && git commit -qm "WIP"
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[ValidateSet("Top", "Bottom")]
[string]
$Position
)
# 0 - Left (doesn't work well)
# 1 - Top
@stuartleeks
stuartleeks / Links.md
Last active July 7, 2021 15:23
Build 2019 - BRK3037 - From dev to production: Container lifecycle, monitoring, logging and troubleshooting
@stuartleeks
stuartleeks / Verify-DeploymentGuid.ps1
Last active January 19, 2021 10:13 — forked from bmoore-msft/Verify-DeploymentGuid.ps1
Fetch the resources tagged in a pid-[GUID] deployment
<#
This is an update of the original script to work with the Az PowerShell module: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-1.0.0
Use this script to retrieve the resources that were deployed with a pid-[GUID] tag
Select-AzSubscription before running the script - it must be run within the subscription context of the deployment
The GUID and resourceGroup name of the deployment are required params
#>
Param(
[GUID][Parameter(Mandatory=$true)]$guid,
[string][Parameter(Mandatory=$true)]$resourceGroupName
#!/bin/bash
############################################################################################
#
# Script used testing access to an Azure storage account with a private endpoint
#
############################################################################################
#
# Argument parsing
@stuartleeks
stuartleeks / .bashrc-utils.sh
Last active July 7, 2020 19:21
.bashrc-utils: Functions, aliases etc from my .bashrc
# Functions, aliases etc from my .bashrc
#
# General utils
#
# from: https://gist.github.com/stuartleeks/c21f035a411215fd20f5a85f78450d01
# simplify dlv debug etc: `dlv2 debug ./cmd/to/run arg1 arg2 ...`
dlv2() { dlv $1 $2 --headless --listen localhost:2345 --api-version 2 -- "${@:3}" ; }