Command cheat sheet
A quiet list of one-line commands, each with what it does and its own copy button. For a README, an onboarding page, or the top of a runbook.
Git, the five you use daily
git switch -c fix/late-feesStart a branch and move onto itgit add -pStage your changes one hunk at a timegit commit --amend --no-editFold what is staged into the last commitgit stash push -m wip-feesPark unfinished work under a namegit log --oneline -5See the last five commits, one line each
Swap fix/late-fees and wip-fees for your own names.
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-command-list">
<section class="cl" aria-labelledby="ukc-code-command-list-title">
<h3 id="ukc-code-command-list-title">Git, the five you use daily</h3>
<ul class="rows">
<li><code>git switch -c fix/late-fees</code><span class="d">Start a branch and move onto it</span><button class="cp" type="button" aria-label="Copy: start a branch"><svg width="14" height="14" 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></button></li>
<li><code>git add -p</code><span class="d">Stage your changes one hunk at a time</span><button class="cp" type="button" aria-label="Copy: stage by hunk"><svg width="14" height="14" 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></button></li>
<li><code>git commit --amend --no-edit</code><span class="d">Fold what is staged into the last commit</span><button class="cp" type="button" aria-label="Copy: amend the last commit"><svg width="14" height="14" 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></button></li>
<li><code>git stash push -m wip-fees</code><span class="d">Park unfinished work under a name</span><button class="cp" type="button" aria-label="Copy: stash with a name"><svg width="14" height="14" 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></button></li>
<li><code>git log --oneline -5</code><span class="d">See the last five commits, one line each</span><button class="cp" type="button" aria-label="Copy: short log"><svg width="14" height="14" 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></button></li>
</ul>
<p class="note">Swap <code>fix/late-fees</code> and <code>wip-fees</code> for your own names.</p>
</section>
</div>
.ukc-code-command-list { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-code-command-list *, .ukc-code-command-list *::before, .ukc-code-command-list *::after { box-sizing: border-box; }
.ukc-code-command-list :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-code-command-list :where(ul, ol) { padding: 0; list-style: none; }
.ukc-code-command-list :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-code-command-list :where(a) { color: inherit; }
.ukc-code-command-list svg { flex: none; }
.ukc-code-command-list { container-type: inline-size; inline-size: 100%; }
.ukc-code-command-list .cl { max-width: 600px; }
.ukc-code-command-list h3 { padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); font-family: var(--uk-font-display, inherit); font-size: 19px; font-weight: 600; line-height: 1.3; }
.ukc-code-command-list .rows li { display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; gap: 0 10px; padding: 9px 0; border-bottom: 1px solid var(--uk-line); transition: background-color var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-code-command-list .rows li:hover { background: var(--ink-soft); }
.ukc-code-command-list .rows code { min-width: 0; font: 600 13px/1.5 var(--uk-font-mono, ui-monospace, monospace); overflow-wrap: anywhere; }
.ukc-code-command-list .rows code::before { content: "$ "; color: var(--uk-muted); font-weight: 400; user-select: none; }
.ukc-code-command-list .d { grid-column: 1; color: var(--uk-muted); font-size: 13px; line-height: 1.4; }
.ukc-code-command-list .cp { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--uk-radius-sm); background: none; color: var(--uk-muted); cursor: pointer; transition: background-color var(--uk-motion-duration) var(--uk-motion-ease), color var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-code-command-list .cp:hover { background: var(--uk-ink); color: var(--uk-paper); }
.ukc-code-command-list .cp:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 1px; }
.ukc-code-command-list .note { margin-top: 10px; color: var(--uk-muted); font-size: 12.5px; }
.ukc-code-command-list .note code { padding: 1px 4px; border-radius: min(var(--uk-radius-sm), 4px); background: var(--ink-soft); color: var(--uk-ink); font: 0.92em var(--uk-font-mono, ui-monospace, monospace); }
@container (min-width: 520px) {
.ukc-code-command-list .rows li { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 30px; gap: 0 16px; }
.ukc-code-command-list .d { grid-column: 2; }
.ukc-code-command-list .cp { grid-column: 3; grid-row: 1; }
}
More code blocks
All 24src/pricing/ticket.ts 86% lines8 of 10 branches 18×export function ticketPrice(age: number, member: boolean) { 18× if (age < 5) return 0; 15× if (member) { 6× return age < 16 ? 4 : 9;1 of 2 branches } 9× if (age >= 65) {never true 0× return 8;never run } 9× return age < 16 ? 6 : 12; }- Ran
- Some branches
- Never ran
import { Halden } from "@halden/sdk"; // Reads HALDEN_KEY from your environment const halden = new Halden(); const job = await halden.jobs.get("JS-2207"); const invoice = await job.invoice(); await invoice.send({ to: job.client });from halden import Halden # Reads HALDEN_KEY from your environment halden = Halden() job = halden.jobs.get("JS-2207") invoice = job.invoice() invoice.send(to=job.client)# The same call, straight to the API curl api.halden.example/v2/invoices \ -H "Authorization: Bearer $HALDEN_KEY" \ -d job=JS-2207 \ -d send=true$ npx tsx send-invoice.ts ✓ Drafted INV-0418 from 22.5 h and 3 receipts ✓ Sent to Reyes Framing · $2,140.00 $
- Install with
npm install @halden/sdkpnpm add @halden/sdkyarn add @halden/sdk - halden sync~/crews/reyes
$ halden sync --since monday Syncing 38 job sheets for Reyes Framing 31/38 ✓JS-2207Alder St refit22.5 h ✓JS-2211Garage roof, Pier Ln14.0 h !JS-2214Bathroom, Mill Lnno sign-off ✗JS-2216Back deck rebuildupload failed Uploading receipts, 4 of 9
src/totals.ts +4−1 @@ -12,3 +12,5 @@ function lineTotal export function lineTotal(l: Line) {− return l.qty * l.rate * (1 + TAX);+ const net = round(l.qty * l.rate); + const tax = round(net * l.taxRate); + return { net, tax, total: net + tax }; }@@ -24,2 +26,3 @@ export const round = (n: number) => + // To the cent, half away from zero Math.round(n * 100) / 100;- .halden.yml+4−3
Changes to .halden.yml. Version 3.1 on the left, version 3.2 on the right. v3.1 v3.2 1 invoices: 1 invoices: 2 prefix: INV 2 prefix: INV 3 − due_days: 14 3 + due_days: 30 4 rounding: line 4 rounding: line 5 − tax: 0.0825 5 + tax: 6 + rate: 0.0825 7 + labor: false 6 − legacy_pdf: true 7 reminders: on 8 reminders: on