unslopkit

Components / Code blocks

Fanfold printout

A program listing on striped continuous paper with feed holes down both edges, a tear line, and the run output below it. For changelogs and anything that wants to feel printed.

LATEFEE.BASLENDING DESK27-NOV-26 PAGE 1

10 REM LATE FEES, 25 CENTS A DAY AFTER 14 DAYS
20 READ N
30 FOR I = 1 TO N
40 READ T$, D
50 IF D > 14 THEN PRINT T$; " OWES $"; (D - 14) * .25
60 NEXT I
70 DATA 3
80 DATA "DUNE", 21, "EMMA", 9, "ULYSSES", 30
90 END
 

Tear here

RUN
DUNE OWES $ 1.75
ULYSSES OWES $ 4
READY.
9 lines · 2 patrons owe fees
Drawn in your kit, Plain.Change the look

The code

Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.

<div class="ukc-code-fanfold-printout">
<figure class="po">
  <div class="sheet">
    <p class="head"><span>LATEFEE.BAS</span><span>LENDING DESK</span><span>27-NOV-26 PAGE 1</span></p>
    <pre class="src"><code><span class="l"><span class="n">10</span> <span class="c">REM LATE FEES, 25 CENTS A DAY AFTER 14 DAYS</span></span>
<span class="l"><span class="n">20</span> <span class="k">READ</span> N</span>
<span class="l"><span class="n">30</span> <span class="k">FOR</span> I = 1 <span class="k">TO</span> N</span>
<span class="l"><span class="n">40</span> <span class="k">READ</span> T$, D</span>
<span class="l"><span class="n">50</span> <span class="k">IF</span> D &gt; 14 <span class="k">THEN PRINT</span> T$; <span class="s">" OWES $"</span>; (D - 14) * .25</span>
<span class="l"><span class="n">60</span> <span class="k">NEXT</span> I</span>
<span class="l"><span class="n">70</span> <span class="k">DATA</span> 3</span>
<span class="l"><span class="n">80</span> <span class="k">DATA</span> <span class="s">"DUNE"</span>, 21, <span class="s">"EMMA"</span>, 9, <span class="s">"ULYSSES"</span>, 30</span>
<span class="l"><span class="n">90</span> <span class="k">END</span></span>
<span class="l"> </span></code></pre>
    <p class="tear"><span>Tear here</span></p>
    <pre class="src out"><samp><span class="l"><kbd>RUN</kbd></span>
<span class="l">DUNE OWES $ 1.75</span>
<span class="l">ULYSSES OWES $ 4</span>
<span class="l">READY.</span></samp></pre>
  </div>
  <figcaption class="cap"><span>9 lines · 2 patrons owe fees</span><button class="copy" type="button"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="8" width="12" height="12" rx="1"/><path d="M16 8V4H4v12h4"/></svg>Copy listing</button></figcaption>
</figure>
</div>

More code blocks

All 24
  • crontab · roastery-01
    30minute 6hour *day of month *month 1-5day of week

    runs/opt/roastery/bin/roast-plan --notify

    Every weekday at 06:30, Monday to Friday, in any month.

    Cron line, explained

  • Listing 4.2A running mean over tide gauge readings
    def moving_average(values, window):
        if window < 1 or window > len(values):
            return []
        total = sum(values[:window])
        out = [total / window]
        for i in range(window, len(values)):
            total += values[i] - values[i - window]
            out.append(total / window)
        return out

    Line 7Each step adds the newest reading and drops the oldest, so the loop never sums the whole window again.

    Book-style listing

  • no_shows.ipynbPython 3.12 · busy

    No-shows by weekday

    Harlow Street Clinic, bookings from January to October 2026.

    [3]
    import pandas as pd
     
    visits = pd.read_csv("visits_2026.csv", parse_dates=["booked_for"])
    visits["weekday"] = visits["booked_for"].dt.day_name()
    [4]
    rate = visits.groupby("weekday")["no_show"].mean() * 100
    rate.round(1).sort_values(ascending=False).head(3)
    [4]
    weekday
    Monday       14.2
    Friday       11.8
    Wednesday     7.9
    Name: no_show, dtype: float64
    [*]
    visits.to_parquet("visits.parquet")

    Running for 4 s

    Notebook cells

  • Run 482 · main · a41c9e2

    Fix family ticket rounding

    Failed in 2m 03s

    1. PassedCheck out code2s
    2. PassedInstall dependencies41s
    3. PassedLint12s
    4. FailedRun tests1m 08s
      $ npm test
      PASS tests/cart.test.ts (14 tests)
      PASS tests/timeslots.test.ts (19 tests)
      FAIL tests/pricing.test.ts (9 tests, 1 failed)
        family ticket covers two adults and three children
          Expected: 38
          Received: 47.5
          at tests/pricing.test.ts:27:31
      Tests: 1 failed, 41 passed, 42 total
      Process exited with code 1

    Build log by step

  • src/hours/closed-days.tsConflict 1 of 3
    export const closedDays = [
      "2026-12-25",
    <<<<<<< mainkeptdropped
      "2026-12-31", // stocktake
    =======
      "2027-01-02", // staff day
    >>>>>>> holiday-hourskeptdropped
    ];

    Result keeps the stocktake day from main.Result keeps the staff day from holiday-hours.Result keeps both days, main first.

    Merge conflict picker

  • Filter a day with a rangeMarina bookings · Postgres

    AvoidThe function hides the column from its index.
    SELECT id, berth, starts_at
    FROM bookings
    WHERE date(starts_at) = '2026-12-05';
    PreferA plain range the index can walk.
    SELECT id, berth, starts_at
    FROM bookings
    WHERE starts_at >= '2026-12-05'
      AND starts_at <  '2026-12-06';

    Avoid and prefer