Skip to content

Instantly share code, notes, and snippets.

View semick-dev's full-sized avatar

Scott Beddall semick-dev

View GitHub Profile
@semick-dev
semick-dev / dotnet-dev-certs-on-ci-machines.md
Last active December 7, 2021 01:26
A quick synopsis of the difficulty with using development certificates on CI

Trusting the dev cert on a CI machine

Why is this a problem?

For the .NET unit tests to run correctly in CI, we need to get the test-proxy development cert trusted on the machine. Locally, a dev does not run into an issue with this first trust step, because dotnet dev-certs https --trust command will work for them. A UAC prompt requires user interaction, which is not possible on a devops agent.

What does dotnet dev-certs https actually do?

There's nothing particularly special about a .NET dev cert. It's merely an x509 certificate that has a very specific extesnsion present. Specifically:

@semick-dev
semick-dev / Terminal-Extensions-README.md
Last active April 30, 2026 22:09
Set-Title, Set-Theme, Set-Random-Theme -- Terminal Extensions

Terminal Extensions

This powershell module is used to set your terminal theme to one downloaded from windowsterminalthemes.dev.

/> Import-Module -DisableNameChecking -FullyQualifiedName <path-to-Terminal-Extensions.psm1>
/> Set-Theme "Chalk"
/> Set-Title "docker logging"
@semick-dev
semick-dev / README.md
Last active April 30, 2026 22:09
Generate a `pester` for a target powershell file.

The poke script

This little powershell script is used to generate a pester test suite for a targeted powershell script.

poke <path-to-*.ps1>

Currently compatible with .-includable scripts only. No modules as of yet.

Also limited to creating new test files. Does not update as of this time.

@semick-dev
semick-dev / mcr.psm1
Last active April 30, 2026 22:09
Interrogate MCR for available repos and tags/
<#
.SYNOPSIS
Gets either a list of available MCR repositories OR lists the available tags for a specific repository.
.PARAMETER Goal
List the repos in MCR, or list the tags for a specific repo.
.PARAMETER Repo
The "repository path" in MCR. EG "dotnet/runtime".
@semick-dev
semick-dev / binary_search.py
Last active April 30, 2026 22:09
Visual Walkthrough of Binary Search
from typing import List
def binary_search(numbers: List[int], key: int):
mid = 0
low = 0
high = len(numbers) - 1
iteration = 0
while high >= low:
@semick-dev
semick-dev / Install-NvChad.ps1
Last active November 13, 2025 23:51
Configure NvChad on installed nvim for Windows
<#
.SYNOPSIS
Destructively Update the nvchad configuration.
.DESCRIPTION
REQUIRES MINGW64 ON THE PATH! Reference <locker-root>/cache/c_cpp/windows-installation.md
1. Takes backup of ~/AppData/Local/nvim + ~/AppData/Local/nvim-data
2. Deletes ~/AppData/Local/nvim + ~/AppData/Local/nvim-data
3. Clone nvchad to ~/AppData/Local/nvim.
@semick-dev
semick-dev / assemble-last-angel.py
Last active April 30, 2026 22:09
Scrape SpaceBattles for Story Text
# requires beautifulsoup4
# requires requests
from bs4 import BeautifulSoup
import requests
post_info = [
("https://forums.spacebattles.com/threads/the-last-angel.244209/#post-9395180", "Chapter 1"),
("https://forums.spacebattles.com/threads/the-last-angel.244209/#post-9452290", "Chapter 2"),
("https://forums.spacebattles.com/threads/the-last-angel.244209/#post-9486254", "Chapter 3"),
@semick-dev
semick-dev / base64-image-encode.ps1
Last active April 30, 2026 22:09
`pwsh` base64 encode/decode scraps
$inputFile = "azure-sdk-qr-smaller.PNG"
$file = "re-rewritten.txt";
$test_out = "re-out.png"
# to base64
[System.Convert]::ToBase64String((Get-Content $inputFile -AsByteStream)) | Set-Content $file
# back to bytes
[Convert]::FromBase64String((Get-Content $file)) | Set-Content $test_out -AsByteStream
@semick-dev
semick-dev / bash-reference.md
Last active April 30, 2026 22:09
Unix QuickRef

Bash QuickRef

Shell manipulation

Escaping the . in . including

If you want to be absolutely certain that your script is being dot-included, escape the dot.

# note the dot is escaped, and has a space to where the invoked script actually exists
@semick-dev
semick-dev / remove-nline-prefix.py
Last active April 30, 2026 22:09
Using regex to clean up gcode output
# To run this script, no installation necessary, but python must be present on system.
# install python, then simply run `python remove-nline-prefix.py` to see it work.
# Replace sample_input as necessary.
# this is reflected in regex 101: https://regex101.com/r/Z7z2sE/1
# and example regex usage in this repo at /scrapyard/notepad++_regex_replace.gif
import re