NoRaincheck

Bookmarks and Stuff

Here are things that I didn’t invent, but I find myself constantly referring back to.


Copilot with Local Provider

1export COPILOT_PROVIDER_TYPE=openai
2export COPILOT_PROVIDER_BASE_URL=http://192.168.0.60:1234/v1
3export COPILOT_PROVIDER_API_KEY=unset
4export COPILOT_MODEL=qwen3.6-35b-a3b-mtp
5export COPILOT_OFFLINE=true
6
7# this should work
8copilot

Super Resolution

Real Super Resolution models are surprisingly accessible: https://github.com/xinntao/Real-ESRGAN

The Catherine Project

Very rarely does something come along that makes me think about lifelong learning, or rather the act of learning itself. The Catherine Project is definitely one such initiative. How can critical thinking be taught or encouraged? How should we introspectively write about ourselves and the thoughts of others?

More importantly, below is a reproduction of the project’s writing guidelines, something which I think is actually more important than the reading lists itself (and for some reason is somewhat hard to find):

A ’local’ .gitignore

Sometimes you want to ignore files and not push them to VSC but also don’t want git to even possibly consider it. To do this, you can update .git/info/exclude

uv Script Mode

See here

uv now supports script mode. This is quite amazing for one-off scripts rather than publishing and overloading pypi, you can just share a single script and uv will correctly pull depdencies (reminds me of flit).

Usage

Start by using --script mode

1uv init --script example.py --python 3.12

Then you can add dependencies. This will update the example.py with the appropriate header

1uv add --script example.py 'requests<3' 'rich'

If one then follows up by adding the shebang

1#!/usr/bin/env -S uv run --script

So that the resulting file looks something like

 1#!/usr/bin/env -S uv run --script
 2# /// script
 3# dependencies = [
 4#   "requests<3",
 5#   "rich",
 6# ]
 7# ///
 8
 9import requests
10from rich.pretty import pprint
11...

Then the script will be completely runnable as a normal cli command!

Unfortunately using it interactively isn’t so straightforward. Though a recipe like:

1$ "$(uv python find --script script.py)"
2>>> from script import X

Should work

Architecture Decision Record

My go-to template is the Alexandrian Pattern, which is based on Design Pattern from Christopher Alexander

Introduction

Specifics


HTML Template

Pico has proven to me to be a good enough HTML template with sensible defaults. It can be classless if you want it to be, or you can have some extras on top.

It provides you with a good starter template.

 1<!DOCTYPE html>
 2<html lang="en">
 3  <head>
 4    <meta charset="utf-8">
 5    <meta name="viewport" content="width=device-width, initial-scale=1">
 6    <meta name="color-scheme" content="light dark">
 7    <link
 8      rel="stylesheet"
 9      href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
10    >
11    <title>Hello world!</title>
12  </head>
13  <body>
14    <main class="container">
15      <h1>Hello world!</h1>
16    </main>
17  </body>
18</html>

Color scheme overrides can be done just by adding an attribute to the html tag, e.g. <html data-theme="light">.


Organising Stuff

I keep coming back to Johnny.Decimal. It has been great for personal, admin things - though I haven’t used it for work or programming related projects. On that front still seeing if I can do better. This blog site “setup” (or lack thereof) has definitely been influenced by Johnny Decimal.