unslopkit

Components / Code blocks

Query and result

A SQL editor with a Run button and its shortcut, and the result table right underneath with the row count and timing. For data tools and admin panels.

unpaid.sql
-- Unpaid and past due, oldest first
SELECT j.code, c.name, i.total,
  current_date - i.due_on AS late
FROM invoices i
JOIN jobs j ON j.id = i.job_id
JOIN clients c ON c.id = j.client_id
WHERE i.paid_at IS NULL
  AND i.due_on < current_date
ORDER BY late DESC;

4 rows in 18 msExport CSV

codenametotallate
JS-2216Pier Ln Holdings6,900.0021
JS-2207Reyes Framing2,140.009
JS-2219Mill Lane Lofts1,212.504
JS-2223O. Whitaker480.001
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-sql-result">
<div class="sq">
  <div class="tb"><span class="nm">unpaid.sql</span><button class="run" type="button" aria-keyshortcuts="Control+Enter"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 5l12 7-12 7z"/></svg>Run<span class="keys" aria-hidden="true"><kbd>Ctrl</kbd><kbd>Enter</kbd></span></button></div>
  <pre class="src"><code><span class="l"><span class="c">-- Unpaid and past due, oldest first</span></span>
<span class="l"><span class="k">SELECT</span> j.code, c.name, i.total,</span>
<span class="l">  <span class="k">current_date</span> - i.due_on <span class="k">AS</span> late</span>
<span class="l"><span class="k">FROM</span> invoices i</span>
<span class="l"><span class="k">JOIN</span> jobs j <span class="k">ON</span> j.id = i.job_id</span>
<span class="l"><span class="k">JOIN</span> clients c <span class="k">ON</span> c.id = j.client_id</span>
<span class="l"><span class="k">WHERE</span> i.paid_at <span class="k">IS NULL</span></span>
<span class="l">  <span class="k">AND</span> i.due_on &lt; <span class="k">current_date</span></span>
<span class="l"><span class="k">ORDER BY</span> late <span class="k">DESC</span>;</span></code></pre>
  <div class="rs">
    <p class="rh"><span><b>4 rows</b> in 18 ms</span><a href="#">Export CSV</a></p>
    <div class="scroll">
      <table class="res">
        <thead><tr><th scope="col">code</th><th scope="col">name</th><th scope="col" class="num">total</th><th scope="col" class="num">late</th></tr></thead>
        <tbody>
          <tr><td>JS-2216</td><td>Pier Ln Holdings</td><td class="num">6,900.00</td><td class="num"><span class="over">21</span></td></tr>
          <tr><td>JS-2207</td><td>Reyes Framing</td><td class="num">2,140.00</td><td class="num">9</td></tr>
          <tr><td>JS-2219</td><td>Mill Lane Lofts</td><td class="num">1,212.50</td><td class="num">4</td></tr>
          <tr><td>JS-2223</td><td>O. Whitaker</td><td class="num">480.00</td><td class="num">1</td></tr>
        </tbody>
      </table>
    </div>
  </div>
</div>
</div>

More code blocks

All 24
  • Guides · API keys

    Rotate a key without downtime

    Run halden keys rotate in your project folder. The old key keeps working for 24 hours, so a deploy that still reads HALDEN_KEY won't fail halfway.

    The CLI writes the new key to ~/.halden/config.toml. Rather click than type? Press Ctrl K in the dashboard and search for keys.

    Shortcuts in the docs

    Search the docs
    /
    Copy the focused snippet
    C
    Next or previous heading
    JK

    Inline code and keys

  • Deck INVOICE.FORCard 12 of 40
    00000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333333333333333333333333444444444444444444444444444444444444444444444444444444444444444444444444444444445555555555555555555555555555555555555555555555555555555555555555555555555555555566666666666666666666666666666666666666666666666666666666666666666666666666666666777777777777777777777777777777777777777777777777777777777777777777777777777777778888888888888888888888888888888888888888888888888888888888888888888888888888888899999999999999999999999999999999999999999999999999999999999999999999999999999999 TOTAL=HOURS*RATE+PARTSINV00120
    Reads
          TOTAL = HOURS * RATE + PARTS
    • 1 to 5label
    • 6continuation
    • 7 to 72statement
    • 73 to 80sequence

    Punch card

  • 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

    Fanfold printout

  • 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