Skip to content

Instantly share code, notes, and snippets.

View RickCogley's full-sized avatar
👻
Slowly but surely implementing ISO 27001 ISMS

Rick Cogley RickCogley

👻
Slowly but surely implementing ISO 27001 ISMS
View GitHub Profile
@RickCogley
RickCogley / index.html
Created April 21, 2025 01:47
Blog nav test
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home - eSolia Pro Blog</title>
<meta name="supported-color-schemes" content="light dark">
<meta name="theme-color" content="hsl(33.38 100% 70%)" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="hsl(237.79 38% 28.000000000000004%)" media="(prefers-color-scheme: dark)">
<body class="flex h-full bg-zinc-50 dark:bg-black">
<!-- Container start -->
<div class="flex w-full">
<div class="fixed inset-0 flex justify-center sm:px-8">
<div class="flex w-full max-w-7xl lg:px-8">
<div class="w-full bg-white ring-1 ring-zinc-100 dark:bg-zinc-900 dark:ring-zinc-300/20"></div>
</div>
</div>
<div class="relative flex w-full flex-col">
<!-- ===== top-nav.vto TEMPLATE START ===== -->
@RickCogley
RickCogley / journalctl-lumecms.log
Created April 3, 2025 04:06
lume error on vps
❯ journalctl -r -u lumecms
Apr 03 03:50:21 ubuntu-4gb-hel1-3 deno[970]: at async Promise.all (index 1)
Apr 03 03:50:21 ubuntu-4gb-hel1-3 deno[970]: at async https://cdn.jsdelivr.net/gh/lumeland/lume@4c90aaf24802e663ee9ac9130158153cb9d15a31/core/ren>
Apr 03 03:50:21 ubuntu-4gb-hel1-3 deno[970]: at async Renderer.#renderPage (https://cdn.jsdelivr.net/gh/lumeland/lume@4c90aaf24802e663ee9ac913015>
Apr 03 03:50:21 ubuntu-4gb-hel1-3 deno[970]: at async Renderer.render (https://cdn.jsdelivr.net/gh/lumeland/lume@4c90aaf24802e663ee9ac9130158153c>
Apr 03 03:50:21 ubuntu-4gb-hel1-3 deno[970]: at async VentoEngine.render (https://cdn.jsdelivr.net/gh/lumeland/lume@4c90aaf24802e663ee9ac91301581>
Apr 03 03:50:21 ubuntu-4gb-hel1-3 deno[970]: at async Environment.runString (https://deno.land/x/[email protected]/src/environment.ts:96:14)
Apr 03 03:50:21 ubuntu-4gb-hel1-3 deno[970]: at async eval (eval at compile (https://deno.land/x/[email protected]/src/environment.ts:151:25), <anon>
Apr 03 03:50:21 ubun
@RickCogley
RickCogley / cards.html
Created April 1, 2025 06:10
Tailwind card alignment
<div class="mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-3">
<article class="flex flex-col items-start justify-between">
<div class="relative w-full">
<div class="absolute inset-0 bg-violet-500 opacity-80 rounded-2xl"></div>
<img src="/assets/cat5-bg.jpg" alt="" class="aspect-video w-full rounded-2xl bg-blend-overlay object-cover sm:aspect-2/1 lg:aspect-3/2">
<div class="absolute inset-0 rounded-2xl ring-1 ring-gray-900/10 ring-inset"></div>
</div>
<div class="max-w-xl">
<div class="z-10">
<!-- ===== post-details.vto TEMPLATE START ===== -->
@RickCogley
RickCogley / 1. East Tokyo.md
Last active March 25, 2025 06:02
Brief Guide to East and West Tokyo

Hi John, Janet - looking forward to seeing you, albeit for only a day. Here's a brief guide to East Tokyo.

See this annotated Google Map. I tried to mark everything below on it.

Your hotel, the Abest, is a "business hotel" in Kyobashi. Business hotel is code here for "functional and basic". When I stayed there in Feb, it was typically clean but cramped, but the duty manager spoke good English and I thought the shower and bed were pretty nice, and wifi worked fine too. I ate breakfast in the Ginza, but the hotel did have a breakfast option. There are several "combini" convenience stores near the hotel, and you can get drinks and meals there. Typical ones are Lawson, 7-11, Family Mart, Mini-Stop. Quality is high at the combini here, so there's no worry about getting ill like you might from a 7-11 burrito in the US.

Kyobashi is east of Tokyo station, extending down to the Ginza area. You can get the Ginza subway line at

@RickCogley
RickCogley / 1. Readme.md
Last active March 19, 2025 11:20
Lume build with basic auth on Netlify

It's by no means strong security, but if you are on a paid plan, you can set basic auth for Lume sites being hosted on Netlify, by copying a template headers file into _headers when you build. Normally I do this for non-production branches, to give better security than nothing. Advanced treatments cost a lot more in subscription fees from Netlify, so this is just a "poor man's" security, really.

Log into your netlify UI, and set environment variables for your project BASIC_AUTH_USER and BASIC_AUTH_PASSWORD, setting their values how you like.

Create a headers-temp file in your site root:

/*
  Basic-Auth: ${BASIC_AUTH_USER}:${BASIC_AUTH_PASSWORD}
@RickCogley
RickCogley / nav.vto
Created March 18, 2025 06:34
Tailwind 4 nav
<!-- ===== top-nav.vto TEMPLATE START ===== -->
<header
class="pointer-events-none relative z-50 flex flex-none flex-col"
>
<div class="order-last mt-[calc(--spacing(16)-(--spacing(3)))]"></div>
<div
class="top-0 order-last -mb-3 pt-3 sm:px-8"
>
<div class="mx-auto w-full max-w-7xl lg:px-8">
<div class="relative px-4 sm:px-8 lg:px-12">
{
"imports": {
"@nic/local-highlight-registry": "jsr:@nic/local-highlight-registry@^0.1.0",
"lume/": "https://deno.land/x/[email protected]/",
"preact": "npm:preact"
},
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
"build": "deno task lume",
"serve": "deno task lume -s"
@RickCogley
RickCogley / _cms.ts
Last active March 1, 2025 08:02
Lume 3 Temporal Tests
cms.collection({
name: "posts",
label: "ブログポスト Blog posts",
description: "日本語と英語のブログポストを編集する<br>Edit blog posts in Japanese and English",
store: "src:posts/*.md",
documentName(data) {
return `${new Date().toISOString().slice(0,10).replace(/-/g,"")}-${data.title}-${data.lang}.md`;
},
fields: [
{
@RickCogley
RickCogley / 1. Readme.md
Last active January 21, 2025 01:10
DMARC Default Digest Report

Scroll down to see a sample default DMARC digest report in XML format. This is why services such as DMARC Digests are so useful, because they translate the default XML into something more human-friendly. The screenshot is what such a service provides.

Screenshot of a good DMARC report