Skip to content

Instantly share code, notes, and snippets.

View RichardSlater's full-sized avatar
🏠
Working from home

Richard Slater RichardSlater

🏠
Working from home
View GitHub Profile
@RichardSlater
RichardSlater / LGTM.md
Created April 30, 2026 11:44
NixOS Windows Subsystem for Linux 25.11 Loki-Grafana-Tempo-Mirmir (LGTM) Stack

LGTM Observability Stack

This document describes the local LGTM stack configured for this NixOS machine. The stack is managed declaratively by NixOS, runs as Podman containers under systemd, stores state on the host, and exposes service ports on localhost only.

LGTM means:

  • Loki for logs.
  • Grafana for dashboards, exploration, and datasource access.
  • Tempo for traces.
  • Mimir for metrics through the Prometheus-compatible API.
@RichardSlater
RichardSlater / copilot-security-instructions.md
Last active October 16, 2025 10:07
GitHub Copilot Instructions
title GitHub Copilot Security and Compliance Instructions
author Richard Slater
created 2025-10-16
updated 2025-10-16
version 1.0
purpose Security and compliance guidelines for AI coding assistants

GitHub Copilot Security and Compliance Instructions

@RichardSlater
RichardSlater / pqc.go
Created April 2, 2025 09:14
Post-Quantum Block Ciphers in Go
package main
import (
"log"
"crypto/mlkem"
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"io"
"crypto/rand"
@RichardSlater
RichardSlater / gpg-public-key.asc
Last active July 26, 2024 19:25
GPG / PGP Keys
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGBplmMBEAC4/lTwUbkk6KB7sC9AoY5OPu8dgInZig58EPHjviENNVr8do+Q
n0slQp6Fp3C6Mj6gyVtfaWVxb9ZE9aTMPf8Kg/bxSHCYKYYLa/ZAerbYQjWW/esa
fsYIps46jHbj4HDIqtSwE9Qg+g3CcOAifos2v0Kqpu/Lwt9VXxwH1J5GMiGJHjf3
vnfZDBq1yRhxOs4pEvPJgfyw1OUFtFGhh1AMwtd+36SxzC0Jv0LdXzEAkwcmJVMC
UeyZU98pZWjlIDndr9rYiuHF5DASwObD9GDf1hNP5y/bw3PmIUmdh09c+IfsYeyv
YklZ5HCUsN20oqKKxTgD7ZVnlq7ZyMG1HbleqVyk6OrGyCG/X1wjZFe1cCOvNZKS
+qFzzZFnHTPCkOqbC3IskcA7IfALhHCeKjZE7niXjZ8Nm/e7kFmCT1bdd2VZiZ8B
5SGz+4zu9Ohiguu6SF+R65zc3hmGdWggQE3y/ySlEvpPZ9rJ9yB5E0eZ7J/grpoF
@RichardSlater
RichardSlater / WharfKitTransactions.ts
Created November 7, 2023 19:02
Using WharfKit in React /w Typescript
"use client"
import styles from './page.module.css'
import { useCallback, useEffect } from 'react';
import React from 'react'
import WalletButton from './components/WalletButton';
import { SessionKit, Session } from "@wharfkit/session"
import { WebRenderer } from "@wharfkit/web-renderer"

Linking my account richardslater on GitHub with my address 0x0860f22da6ba75627ddad10ad198ffb215a8fe76 on EVM in mycryptoprofile.io, and the challenge code is: dda32788572262c2df8133ca19e79e9a. #LitentryVerifyMyAddress

@RichardSlater
RichardSlater / connect-to-gdrive.py
Created March 26, 2022 20:08
Medium.com: Creating AI Art? Has your Super-SloMo model stopped working?
from google.colab import drive
drive.mount('/content/drive')
@RichardSlater
RichardSlater / format.ps1
Created March 4, 2022 13:01
Format CSV as IP Address List for qBittorrent (p2p)
Function Format-IP ($ip) {
$octets = $ip.Split(".") | Select-Object @{label="Octet";expression={ [Int32]::Parse($_).ToString("000") }}
return [String]::Join(".", $octets.Octet)
}
$ips = Import-Csv .\ru.csv | Select-Object -Property Start, End, Notes
$output = $ips | Select-Object @{label="Start";expression={ Format-IP $_.Start }}, @{label="End";expression={ Format-IP $_.End }}, notes
$output | ForEach-Object { "{0} - {1} , 000 , {2}" -f $_.Start, $_.End, $_.Notes }
@RichardSlater
RichardSlater / day1.cs
Last active December 3, 2021 16:00
Advent of Code 2021
var depths = File.ReadAllLines(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "input.txt")).Select(x => Int32.Parse(x));
// part 1
depths
.Skip(1)
.Zip(depths, (curr, prev) => curr > prev)
.Count(x => x == true)
.Dump("Part 1: Depths larger than previous depth");
// part 2
@RichardSlater
RichardSlater / step1.ps1
Last active October 12, 2020 19:49
Install SSH Client on Windows 10
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'