A friend of mine and I spent about five hours building this into Hugo. Here is Jamin’s version. You can find the source code on GitHub here. Incredibly, we embedded WASM running from Rust into this Hugo blog post. The most difficult part involved shoe-horning the WASM into Hugo. It uses three files: 0.wasm-game-of-life.js b5c3cfdbd4523a4f1959.module.wasm wasm-game-of-life.js <--- Previously known as bootstrap.js We build those in a separate apps/ directory and copy them over....
Helping a Friend Create a New Blog with Hugo and GitHub Pages
These very high level steps helped a friend set up a Hugo site. Set up Your GitHub Pages Create a new GitHub account. Create a GitHub public repository for GitHub Pages. Clone that repository to your local machine. Publish your first plain text file as a GitHub Page. Done. Milestone achieved! Get distracted by learning PowerShell, Git, and NeoVim. Yah! Set up Your Hugo Site Install Hugo! (choco install hugo)....
Personal Anki Tips
After 1,176 cards and 91 days of studying with Anki I now use these guidenlines. Revision of cards is key: create cards, review cards, suspend cards, revise cards. Guidelines Make cards very, very easy. Prefer cloze deletions. Minimize words. When reviewing, suspend cards I dislike. Set a very low bar for suspension. Revise suspended cards, then unsuspend ’em for a second chance. Change Note Type Ctrl + Shift + M Toggle Suspend Ctrl + J Preview Clozes Ctrl + L If a card seems unsalvagable, delete or archive it....
List git branches with the date and author of the last commit
git branch --all --sort=creatordate --sort=committername ` --format "%(align:20) %(creatordate:short) %(end) %(align:25) %(committername) %(end) %(refname:lstrip=-1)" See also: https://www.bigfont.ca/list-git-branches-with-the-name-of-the-last-committer
On the effectiveness of positive feedback
Positive feedback helps because: it reinforces existing good behavior, it communicates that someone inspects the work, and it opens the apperture to receive corrective feedback. Reinforcing existing good behavior helps maintain it. Managers can reasonably expect staff to complete 60% of assigned tasks; we want to preserve that good behavior. If we focus on correcting the missing 40%, most people will perform worse. Build foundations; reinforce the existing good stuff....
Answer the question and shut-up
This is advice for myself. When PhD students do their thesis defense, experts fly in to grill the student. Good thesis advisors train students to answer each question and then shut-up. Students almost always feel a temptation to elaborate. Examiner: Why did you use that particular statistical test? Student: We used regression because our data met its requirements for establishing cause-and-effect. Examiners: Silence. Student: We designed our data collection to adhere to parametric test requirements....
Reduce and/or aggregate in PowerShell
PowerShell’s built-in ForEach-Object provides a reduce/aggregate routine. In short-form it looks like this to sum a range of numbers. @(1, 2, 3) | ForEach-Object { $sum = 0; } { $sum += $_; } { $sum; } If we break it out with comments, we can see three blocks. @(1, 2, 3, 4, 5) | ForEach-Object { # Begin. Here we set up the accumulator. $sum = 0; } { # Process....
Set image metadata with exiftool
Install it from here https://exiftool.org/ Find available tag names here https://exiftool.org/TagNames/index.html The following example sets the IPTC:Keywords attribute. exiftool(-k).exe .\turtles-climbing-hills.png -IPTC:Keywords="Absurd"
Debug legacy .NET Framework with VS Code
Build your app with a portable Program Database (PDB) output. msbuild ` /property:Configuration=Debug ` /property:Platform=x64 ` /property:DebugType=portable ` /t:Clean,Build ` /p:DeployOnBuild=true ` /p:WebPublishMethod=Package ` /p:PackageAsSingleFile=false ` C:\dev\MyApp In VSCode, Create ./.vscode/launch.config with this content. { "version": "0.2.0", "configurations": [ { "name": ".NET Attach", "type": "clr", "request": "attach", "processId": "${command:pickProcess}" } ] } In VSCode, Use <CTRL> + <SHIFT> + <P> to enter the command palette. Then choose Start Debugging. Then attach to your particular app....
Sunset Existing Blogs
Archive Process Download the sunsetted sites as static archives. Serve them through CloudFlare pages. Done! Achived URLs: https://bigfont.ca https://www.bigfont.ca https://blog.bigfont.ca https://muddlingthru.ca https://www.muddlingthru.ca https://muddlingthru.com https://www.muddlingthru.com We used https://www.httrack.com/ to perform the archiving. Other tools also exist.