Skip to content

Instantly share code, notes, and snippets.

View amcgregor's full-sized avatar
🏢
I died! …well, I got better…

Alice Zoë Bevan–McGregor amcgregor

🏢
I died! …well, I got better…
View GitHub Profile
@amcgregor
amcgregor / 404.html
Last active October 5, 2025 01:37
My own HTML5 boilerplate sans most of the code. Because there's too much Romulus-be-damned boilerplate, and people fail to realize almost none of it is in any way needed. For more details than you probably wanted, ref: https://codepen.io/tomhodgins/post/code-that-you-just-never-ever-need-to-write formerly https://tomhodgins.hashnode.dev/code-tha…
<!DOCTYPE html><html lang=en>
<title>Page Not Found</title>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<h1>Page Not Found</h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
@amcgregor
amcgregor / Makefile
Last active August 28, 2025 21:39
A sample block of Makefile automation to generate very pretty help text.
help: ## Show this help message and exit.
@echo "Usage: make <command>\n\033[36m\033[0m"
@awk 'BEGIN {FS = ":.*##"} /^[a-zA-Z_-]+:.*?##/ { printf "\033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
@amcgregor
amcgregor / 1-cipher.py
Last active August 26, 2025 20:57
My rotating-ring Cheshire cipher, including sample plaintext and ciphertext. #encryption #ciphertext #rotcipher
# encoding: utf-8
from optparse import OptionParser
import sys
class Cheshire(object):
"""Cheshire, a class for simple Caesar-cipher-like encryption.
Cheshire, depending on use, is a very complex form of Caesar-cipher.
It has superb security if used with a properly random passphrase and
@amcgregor
amcgregor / 00-header.sh
Last active August 19, 2025 02:21
A convenient motd-creation script for Gentoo servers.
#!/bin/sh
# Place in /etc/motd.d and drop the .sh suffix.
echo -e "\n\033[1mWelcome to Gentoo Linux!\033[0m"
echo -e "\nThis server is maintained by \033[1m$(cat /etc/maintainer)\033[0m."
echo -e "Contact \033[1m$(cat /etc/maintainer-address)\033[0m for support."
echo -en "\n \033[1;32m*\033[0m "
@amcgregor
amcgregor / content-basic.html
Last active May 17, 2025 20:51
"Xray CSS" to highlight element nesting and stacking. #pen https://codepen.io/amcgregor/pen/bGEodOR
<!-- This look like a confusing mess? See it with X-Ray goggles! -->
<div class="container">
<div class="logo-footer">
<div class="row" style="display: flex;">
<div class="col-md-6">
<div class="row">
<div class="col-md-6">
<a href="#">
<img src="img/logos/{{site.logo}}" class="img-responsive img-centered" alt="">
</a>
@amcgregor
amcgregor / 00-intro.md
Last active May 17, 2025 20:28
Semantic HTML Tabbed Content #pen https://codepen.io/amcgregor/pen/ZNeajJ

WebCore UI Tabbed Content

With simple markup (see the markup file for an example) you can turn any definition list into a tabbed content area. Combined with the rest of the base WebCore UI styles, the sample looks like:

screenshot

@amcgregor
amcgregor / content.html
Last active May 17, 2025 20:25
Semantic Accessible Tabbed Interfaces #pen
<dl role=tablist>
<dt role=tab tabindex=0 aria-selected=true>First Tab
<dd role=tabpanel>
<p>
Aenean lacinia bibendum nulla sed consectetur. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec sed odio dui. Cras mattis consectetur purus sit amet fermentum. Nullam id dolor id nibh ultricies vehicula ut id elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Nullam quis risus eget urna mollis ornare vel eu leo.
<p>
<input id=input>
<p>
Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
<p>
@amcgregor
amcgregor / content.html
Last active May 17, 2025 19:45
Alice's Adventures in Wonderland (Book Formatting) #pen https://pen.webcore.io/fba63c3b6c58b0c8b10db0234d83fb6a
<h1>Alice's Adventures in Wonderland</h1>
<h2>Chapter I. <span>Down the Rabbit-Hole</span></h2>
<p>Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, “and what is the use of a book,” thought Alice “without pictures or conversations?”
<p>So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her.
<p>There was nothing so very remarkable in that; nor did Alice think it so very much out of the way to hear the Rabbit say to itself, “Oh dear! Oh dear! I shall be late!” (when she thought it over afterwards, it occurred to her that she ought to have wondered at this, but at the time it all seemed quite natural); but when the
@amcgregor
amcgregor / basic.html
Created January 6, 2025 06:49
Minimum required HTML content.
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<title>Some title and other header content…</title>
<p>Body content begins</p>
@amcgregor
amcgregor / nft-ethereum.eml
Created October 22, 2024 03:53
How not to approach someone who hates NFTs & Blockchain when hiring someone for NFTs & Blockchain.
Howdy!
You have me curious, thus the response. I’ll dissect the bits of this in sequence, skipping for now that there was no subject for your e-mail.
If this e-mail address was hijacked for spam, apologies for whomever this response may have been misdirected towards. Feel free to ignore.
> On Oct 22, 2024, at 07:36, Nycolas S...e <n...2@gmail.com> wrote:
A supposedly professional communication from a Gmail account despite advertising a domain in the footer; not a good start, and it continues downhill from there. Every paragraph prefixed with an emoji… I am not a fresh graduate who might find allure in such.