Skip to content

Instantly share code, notes, and snippets.

View lynsei's full-sized avatar
:octocat:
Huzzah!

Lynsei lynsei

:octocat:
Huzzah!
View GitHub Profile
@lynsei
lynsei / import-map.json
Created May 2, 2025 17:10
[deno patch modules] #deno #importmaps #patching
{
"imports": {
"example/": "https://deno.land/x/example/"
},
"scopes": {
"https://deno.land/x/example/": {
"https://deno.land/x/[email protected]/mod.ts": "./patched/mod.ts"
}
}
}
@lynsei
lynsei / markdown.md
Last active May 1, 2025 21:09
[github-markdown] #markdown #github #cheats

Here is a simple footnote1.

A footnote can also have multiple lines2.

@octocat 👍 This PR looks great - it's ready to merge! :shipit:

Footnotes

  1. My reference.

  2. To add line breaks within a footnote, prefix new lines with 2 spaces. This is a second line.

@lynsei
lynsei / .copy.back.fish
Created May 1, 2025 16:13
[fish-log] logging function with colors and accepting unlimited variadic key-value combinations
# multi-file copy to paths in the CSV file
# very useful if you are updating multiple paths from a source location often, especially useful if the source location changes or if there are many
function .copy.back -d "Multi-copy a file to template paths" -a source
# Multi-copy to locations listed in .targets.multi-copy.csv
source $PWD/scripts/.log.fish
# set the possible colors that alternate under the file copy list
set -a possible_colors blue
set -a possible_colors cyan
set -a possible_colors blue
@lynsei
lynsei / .lefthook.commit.ts
Last active May 1, 2025 15:07
[commit-msg] #deno validation for #lefthook
#!/usr/bin/env -S deno run --allow-read
/**
* @file .lefthook.commit.ts
* @description This script validates commit messages based on a specific format.
* @author Lynsei H
* @usage deno run -A ./src/.lefthook.commit.ts "feature/story_89: This is cool!"
* @returns true if commit is invalid, otherwise false
*/
const VALID_TYPES = [
@lynsei
lynsei / release-update.rb
Created April 30, 2025 14:25
[homebrew tap] EXAMPLE of Trunk.io Auto-release regex
cask "trunk-io" do
version "1.3.4"
sha256 "89fbdd8c7b63649eeb1479415757b898903c041e73b49b78028dbd64eca3087a"
url "https://trunk.io/releases/launcher/#{version}/trunk"
name "Trunk Launcher"
desc "Developer experience toolkit used to check, test, merge, and monitor code"
homepage "https://trunk.io/"
livecheck do
@lynsei
lynsei / code.md
Created April 30, 2025 13:34
[Acceptance Criteria] Definition of Done [REUSABLE]

GITHUB SCOPES

FIPS-140-3 with code complexity of  $( Ω(n log(n)) > O(n^2) )

Acceptance Criteria

Criteria Details
Efficiency Typescript code must be efficient, reusable, and modular.   Code must be complexity of less than 10.
Security & Governance Code must enforce security policies, governance standards, and rollback scenarios.
@lynsei
lynsei / fetchAllRepos.ts
Created April 28, 2025 16:21
[cruft-code] - template parsing repo data #typescript #deno
export async function fetchAllRepos(): Promise<Type.RepoData[]> {
const repos: Type.RepoData[] = [];
let page = 1;
const perPage = 500;
while (true) {
console.log(blue(`Fetching page ${page}...`));
const response = await fetch(
`https://api.github.com/orgs/${ORG_NAME}/repos?per_page=${perPage}&page=${page}`,
@lynsei
lynsei / Download-gists.sh
Created April 18, 2025 16:07
Download gists to sqlite
#!/usr/bin/env bash
set -euo pipefail
# Requirements: curl, jq, sqlite3
# Usage: ./download_gists.sh <github_token> <output_db>
GITHUB_TOKEN="$1"
DB_FILE="$2"
@lynsei
lynsei / deno-fmt-ignore.ts
Created April 17, 2025 15:25
[deno format ignore] fmt-ignore
// deno-fmt-ignore
const wasmCode = new Uint8Array([
0, 97, 115, 109, 1, 0, 0, 0, 1, 133, 128, 128, 128, 0, 1, 96, 0, 1, 127,
3, 130, 128, 128, 128, 0, 1, 0, 4, 132, 128, 128, 128, 0, 1, 112, 0, 0,
5, 131, 128, 128, 128, 0, 1, 0, 1, 6, 129, 128, 128, 128, 0, 0, 7, 145,
128, 128, 128, 0, 2, 6, 109, 101, 109, 111, 114, 121, 2, 0, 4, 109, 97,
105, 110, 0, 0, 10, 138, 128, 128, 128, 0, 1, 132, 128, 128, 128, 0, 0,
65, 42, 11
]);
@lynsei
lynsei / Azure-aks-kubectl.md
Created March 24, 2025 17:43
Setup kubectl credentials for AKS

Configuring kubectl to Access AKS Clusters

This guide will help you configure kubectl to access Azure Kubernetes Service (AKS) clusters, including setting up contexts and testing local configurations.

Prerequisites

Make sure you have the following installed:

  • Azure CLI (az): To manage Azure resources.
  • kubectl: To interact with Kubernetes clusters.