Skip to content

Instantly share code, notes, and snippets.

@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
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[ValidateSet("Top", "Bottom")]
[string]
$Position
)
# 0 - Left (doesn't work well)
# 1 - Top
@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!

#!/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}" ; }
$env:HOME="" # avoid conflicts with devcontainers across OSes
$env:GIT_SSH="C:\Windows\System32\OpenSSH\ssh.exe" # set git to use the OpenSSH install and pick up keys from the SSH Agent (avoiding prompting for passphrases)
@stuartleeks
stuartleeks / dlv2-add-to-bashrc.sh
Created June 8, 2020 10:40
dlv2 - delve helper
# simplify dlv debug etc: `dlv2 debug ./cmd/to/run arg1 arg2 ...`
dlv2() { dlv $1 $2 --headless --listen localhost:2345 --api-version 2 -- "${@:3}" ; }
function Set-Prompt {
param (
# Specifies a path to one or more locations.
[Parameter(Mandatory=$true,
ValueFromPipeline=$true)]
[ValidateNotNull()]
[string]
$PromptText
)
$Host.UI.RawUI.WindowTitle = $PromptText
free -h
sync
echo 3 > /proc/sys/vm/drop_caches
free -h
@stuartleeks
stuartleeks / .bashrc-ssh-forward.sh
Last active May 4, 2020 20:47
WSL SSH forwarding
#
# Set up ssh agent forwarding to host
#
# Include this in .bashrc
# Ensure that the ssh-agent service is running on windows
# build https://github.com/jstarks/npiperelay and ensure it is in your PATH (or modify the script to specify the qualified path)
# Configure ssh forwarding
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock