Skip to content

Instantly share code, notes, and snippets.

View jmcph4's full-sized avatar

Jack McPherson jmcph4

View GitHub Profile
@jmcph4
jmcph4 / lines.md
Last active November 19, 2025 04:54
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Rust                            16            147            114            868
Markdown                         4             20              0             46
YAML                             2             15              0             42
TOML                             3              7              1             39
JSON                             1              1              0             10
-------------------------------------------------------------------------------
#!/usr/bin/env bash
set -euo pipefail
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
echo "Usage: attrib [COMMIT_HASH] [AUTHOR_NAME]"
echo
echo "Defaults:"
echo " COMMIT_HASH = git rev-parse HEAD"
echo " AUTHOR_NAME = jmcph4"
exit 0
#!/usr/bin/env python3
# Extract TOP500 listings for a given country from the provided XML.
# Source schema example: :contentReference[oaicite:0]{index=0}
import argparse
import csv
import json
import sys
import xml.etree.ElementTree as ET
from typing import Dict, List, Optional
@jmcph4
jmcph4 / hoom.rs
Last active September 28, 2025 03:14
use std::fmt::Display;
use clap::{Parser, Subcommand};
#[derive(Copy, Clone, Debug)]
pub enum Cost {
Fixed(f64),
Proportion((f64, f64)),
}
@jmcph4
jmcph4 / pelag.html
Last active September 13, 2025 05:56
<html>
<body>
<ul>
<li>[2025-09-09T18:56:12+10:00] <a href="https://doc-en.rvspace.org/JH7110/PDF/JH7110_Product_Brief.pdf">StarFive JH-7110 Product Brief (PDF)</a></li>
</ul>
<hr />
<ul>
<li>[2025-09-09T18:56:12+10:00] <a href="https://wiki.osdev.org/RISC-V">RISC-V - OSDev Wiki</a></li>
</ul>
<hr />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// cargo-deps: tokio={version="1", features=["full"]}
// Event-driven Tokio example that reacts to multiple kinds of events using `tokio::select!`.
//
// It concurrently handles:
// - incoming TCP connections
// - periodic timer ticks
// - messages arriving on an mpsc channel
// - Ctrl+C for graceful shutdown
//
// Run: `cargo run` then (optionally) `nc 127.0.0.1 8080` in another shell.
Law firm Example ASX IPO advised Role Date (AEST) Source
King & Wood Mallesons 29Metals Limited (ASX:29M) Issuer counsel 2021-06-29 KWM press release
Herbert Smith Freehills Guzman y Gomez Limited (ASX:GYG) Joint lead managers’ counsel 2024-06-20 HSF press release
Allens Redbubble Ltd (ASX:RBL) Issuer counsel 2016-05-23 [Allens press release](https://www.allens.com.au/insights-new