tbesedahttps://tbeseda.smol.pub2024-03-28T11:59:35ZtbesedaRun Hurl tests against a Node.js server2022-12-01T19:27:32Ztag:tbeseda.smol.pub,2022-12-01:/hurl-test-node-server<pre>
#!/bin/bash
set -eu # throw if things go bad
echo "Booting server"
npm run start &
serverPid=$!
sleep 2 # a smarter script would ping server
echo -e "\nRunning Hurl tests\n"
npx hurl --test test/integration/*.hurl
echo -e "Stopping server <${serverPid}>"
kill $serverPid
</pre>tbesedagitclean zsh command2022-07-27T13:33:59Ztag:tbeseda.smol.pub,2022-07-27:/gitclean-zsh<pre>
gitclean() {
git clean -Xdn
if read -q REPLY\?"Clean these? (Y/y)"; then
git clean -Xdf
else
echo "Still dirty."
fi
}
</pre>
<p>For more fancy, use "gum":</p>
<pre>
gitclean() {
DIRTY=$(git clean -Xdn | sed 's/Would remove //g')
gum style \
--foreground 196 --border thick --border-foreground 88 \
--margin "1 2" --padding "1 3" "$DIRTY"
gum confirm "🧹 Delete these?" \
&& git clean -Xdf \
|| echo "Still dirty."
}
</pre>
<p><a href="https://github.com/charmbracelet/gum">gum docs</a><br/>
<a href="https://gist.github.com/tbeseda/808bb92754161e8032b6cf59fdbc5919">gist version with preview image</a><br/>
</p>tbesedaThe Docs don't do CodeMirror v6 Justice2022-07-16T18:46:34Ztag:tbeseda.smol.pub,2022-07-16:/cm6-docs<p>Up front, CodeMirror 6 is a great piece of software.</p>
<p>But holy hell it's hard to wrap my head around this paradigm. I understand the _why_ of this approach, but learning _how_ to interact with it is rough. This is a combo of my own inexperience here and a lack of content.</p>
<p>The docs are thorough but are almost entirely reference material. All on a single page. Very limited navigation.</p>
<p>The Examples section helps! But it's unclear what I will find where -- so I've read them all a few times.</p>
<p>There's a rad playground, but limited base samples.</p>
<p>The forums have some valuable lessons, but it's hard to separate outdated answers from the new v6 stuff.</p>
<p>Not to mention many links to the reference docs don't resolve to an anchor on the long-form doc.</p>
<p>I say all this not to shame CM docs, but to remind myself that even capable newcomers struggle through learning new programs when the docs don't live up to the library.</p>tbesedaA Story About the Evolution of a New Web Framework2022-06-29T21:21:51Ztag:tbeseda.smol.pub,2022-06-29:/enhance-story<h2>Origins</h2>
<h3>The old days</h3>
<p>The original web was a revelation. It may be lo-fi compared to what we know today, but it was a dream for academics, scientists, and indie hobbyists. The Internet connected computers and people around the world. </p>
<h3>www</h3>
<p>It took a long time for technologists to decide the best way to connect people-with-computers to computers-with-content. But content was everywhere and innovation thrived.</p>
<p>Browsers were born, walled off, and burned down. Vendors thrashed. All while adoption of the web accelerated. People shared.</p>
<h2>Middle ages</h2>
<h3>Business-pants</h3>
<p>As the business of the web took hold, companies and developers pushed the web to its limits. Constantly running into browser and device limitations. We had to build sites with `<table>`s and spacer .gifs.</p>
<h3>Frameworks and build tools all the way down</h3>
<p>Libraries helped normalize programming for the web. Then the frameworks had frameworks. And configuration of configuration. Soon frameworks rewrote browser mechanics inside the browser instead of dealing with browser compatibility and shortcomings. </p>
<h3>Spinners; spinners everywhere</h3>
<p>Add a whole new crop of mobile devices and their browsers, the best we could do was paper over browsers and send whole apps to the client. Complete with the fanciest loading screens. Single page apps were cranked out with iterative tools stitched together with .config files and transpiling bundlers.</p>
<h3>Components</h3>
<p>Component-style development takes off. The only relief from the chaos is authoring web applications with composable elements; small, understandable containers for the madness. As long as the config files were set up correctly…</p>
<h2>A New Framework</h2>
<h3>Browsers caught up</h3>
<p>While we were waiting on our test suites, browser vendors worked together and got their act together. Performance gains, standardized APIs, increased user security and privacy, and native components. The sun rises on the platform. 🌅</p>
<h3>Bliss</h3>
<p>Back to basics. Real `<form>` tags. Sane CSS layouts in .css files. Native custom elements. No breaking changes or chasing version numbers.</p>
<h3>A new framework</h3>
<p>What’s left to solve? Well, getting your code from a server to users’ browsers and a way to organize all those features of the next unicorn. A progressively-enhanced, web-native, HTML-first framework that will work as long as the web does: <framework-website.url></p>
<p>https://gist.github.com/tbeseda/faa558264f8bd42f644912bffc78477e</p>tbesedaBootcamps should teach table saws2022-06-28T21:49:03Ztag:tbeseda.smol.pub,2022-06-28:/bootcamp-table-saw<p>If I showed you how to start woodworking with just a handsaw + nails and you strike out on your own becaming adept, you’d probably invent a speed square, a miter box, and even glue.</p>
<p>notbad.jpg</p>
<p>But before you start carrying around a truck full of hand tools, it’s my responsibility to introduce you to the modern table saw. At least before graduating you from -b̶o̶o̶t̶c̶a̶m̶p̶- apprentice to full-time carpenter.</p>
<p>This isn’t on aspiring woodworkers. It's on their instructors.</p>tbesedaTiny Bookmark Tab WebExtension2022-06-14T13:08:59Ztag:tbeseda.smol.pub,2022-06-14:/bookmark-tab<p>I've been using a custom Firefox web extension for my homepage for nearly a year now. It's just a tree-list of my browser's bookmarks. It's built for speed; no extra features already provided by the browser (like bookmark organization).</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/tiny-bookmark-tab/">https://addons.mozilla.org/en-US/firefox/addon/tiny-bookmark-tab/</a><br/>
<a href="https://github.com/tbeseda/tiny-bookmark-tab-webextension">https://github.com/tbeseda/tiny-bookmark-tab-webextension</a><br/>
</p>tbesedaI use exa instead of ls2021-11-21T20:16:21Ztag:tbeseda.smol.pub,2021-11-21:/exa-instead-of-ls<p><a href="https://the.exa.website/">https://the.exa.website/</a><br/>
</p>
<p>My exa aliases (in ~/.zshrc):</p>
<pre>
alias ll="exa --all --header --icons --long"
</pre>
<img src="exa-ll.png"/>
<pre>
alias lt="ll --tree --level=3 --git-ignore --ignore-glob='.git|node_modules'"
</pre>
<img src="exa-lt.png"/>
<p>I spent a lot of time reading the command line options doc, tweak as needed :)</p>
<p><a href="https://the.exa.website/docs/command-line-options">https://the.exa.website/docs/command-line-options</a><br/>
</p>tbeseda