return Array(count + 1).join(character)
}
+function cleanAttribute (attribute) {
+ return attribute ? attribute.replace(/(\n+\s*)+/g, '\n') : ''
+}
+
var myPlugin = {
pre: function(turndownService) {
turndownService.addRule('preNoCode', {
})
},
- preserveHTMLMatching: function(turndownService) {
+ imageCaptions: function(turndownService) {
+ turndownService.addRule('altTextIsFigCaption', {
+ filter: 'img',
+ replacement: function (content, node) {
+ var alt = cleanAttribute(node.getAttribute('alt'))
+ if (alt) alt = "alt:" + alt
+ var title = cleanAttribute(node.getAttribute('title'))
+ var titlePart = title ? ' "' + title + '"' : ''
+ var src = node.getAttribute('src') || ''
- },
-}
+ // Look for associated figcaption
+ var figure = node
+ while (figure && figure.nodeName != 'FIGURE') figure = figure.parentElement
+ if (figure) {
+ for (const child of Array.from(figure.children)) {
+ if (child.nodeName == "FIGCAPTION") {
+ alt = "caption:" + child.textContent
+ }
+ child.remove()
+ }
+ }
+ return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''
+ }
+ })
+ }
+}
// Preview options at https://mixmark-io.github.io/turndown/
var turndownService = new TurndownService({
})
turndownService.use(turndownPluginGfm.tables)
turndownService.use(myPlugin.pre)
+turndownService.use(myPlugin.imageCaptions)
turndownService.keep('iframe')
turndownService.keep('video')
-//turndownService.use(myPlugin.preserveHTMLMatching)
+turndownService.preserve(function(node, options) {
+ return node.nodeName == "FIGURE" && node.classList.contains("wp-block-gallery")
+})
const html = fs.readFileSync(0, "utf-8");
const markdown = turndownService.turndown(html)
for img in soup.find_all("img"):
figure = soup.new_tag("figure")
figure['class'] = "wp-block-image"
+
+ caption = None
+ if img['alt'] == "": # No alt-text or caption
+ del img['alt']
+ elif img['alt'] and img['alt'].startswith('alt:'): # Alt-text
+ img['alt'] = img['alt'].removeprefix('alt:')
+ else: # Caption
+ if img['alt'] and img['alt'].startswith('caption:'):
+ img['alt'] = img['alt'].removeprefix('caption:')
+ caption = img['alt']
+
+ if img.parent.name == "a":
+ img = img.parent
img.wrap(figure)
+ if caption is not None:
+ captionE = soup.new_tag("figcaption")
+ captionE.string = caption
+ figure.append(captionE)
+
for pre in soup.find_all("pre"):
pre['class'] = "wp-block-code"
return soup
def markdown2html(html):
- html = markdown2.markdown(html, extras=['tables', 'header-ids', 'fenced-code-blocks'])
+ html = markdown2.markdown(html, extras=['tables', 'header-ids', 'fenced-code-blocks', 'markdown-in-html'])
soup = BeautifulSoup(html, 'html.parser')
soup = post_process(soup)
return str(soup) #.prettify()
"dependencies": {
"joplin-turndown-plugin-gfm": "^1.0.12",
"puppeteer": "^22.13.0",
- "turndown": "^7.2.0"
+ "turndown": "file:../turndown"
+ }
+ },
+ "../turndown": {
+ "version": "7.2.0",
+ "license": "MIT",
+ "dependencies": {
+ "@mixmark-io/domino": "^2.2.0"
+ },
+ "devDependencies": {
+ "@rollup/plugin-commonjs": "^19.0.0",
+ "@rollup/plugin-node-resolve": "13.0.0",
+ "@rollup/plugin-replace": "2.4.2",
+ "browserify": "17.0.0",
+ "rewire": "^6.0.0",
+ "rollup": "2.52.3",
+ "standard": "^10.0.3",
+ "turndown-attendant": "0.0.3"
}
},
"node_modules/@babel/code-frame": {
"node": ">=6.9.0"
}
},
- "node_modules/@mixmark-io/domino": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/@mixmark-io/domino/-/domino-2.2.0.tgz",
- "integrity": "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==",
- "license": "BSD-2-Clause"
- },
"node_modules/@puppeteer/browsers": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.3.tgz",
"node": ">=0.10.0"
}
},
- "node_modules/specificity": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz",
- "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==",
- "license": "MIT",
- "bin": {
- "specificity": "bin/specificity"
- }
- },
- "node_modules/split-selector": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/split-selector/-/split-selector-1.0.0.tgz",
- "integrity": "sha512-9KJjJyHL7zH4xSCbv+SPmhMfPujwSSQBhVa0DGcI0hS30veSSi7hYeXNvTZ8orrtw5/25aoHz43S910IpjRWCQ==",
- "license": "MIT"
- },
"node_modules/sprintf-js": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
"license": "0BSD"
},
"node_modules/turndown": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/turndown/-/turndown-7.2.0.tgz",
- "integrity": "sha512-eCZGBN4nNNqM9Owkv9HAtWRYfLA4h909E/WGAWWBpmB275ehNhZyk87/Tpvjbp0jjNl9XwCsbe6bm6CqFsgD+A==",
- "license": "MIT",
- "dependencies": {
- "@mixmark-io/domino": "^2.2.0"
- }
+ "resolved": "../turndown",
+ "link": true
},
"node_modules/unbzip2-stream": {
"version": "1.4.3",
"integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==",
"license": "MIT"
},
- "node_modules/visual-html": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/visual-html/-/visual-html-2.1.2.tgz",
- "integrity": "sha512-QkG28tVW5rRI7ZTz/6jt+hhQlFDaG5OOR5TbnHMKTAhaRx/ZxICJ4SH+/gtacIh8kvaiK0EUSOsQuKG9Nh/lLQ==",
- "license": "MIT",
- "dependencies": {
- "specificity": "^0.4.1",
- "split-selector": "^1.0.0"
- }
- },
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"dependencies": {
"joplin-turndown-plugin-gfm": "^1.0.12",
"puppeteer": "^22.13.0",
- "turndown": "^7.2.0"
+ "turndown": "file:../turndown"
}
}
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/backup-android-on-plugin/" rel="ugc">Backup android on plugin | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/android-backup-on-arch-linux/" rel="ugc">Android backup on arch linux | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/year-in-review/" rel="ugc">Year in Review | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
<!-- comments -->
<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/mail-filtering-with-dovecot/" rel="ugc">Mail filtering with Dovecot - Optimal Prime</a></p>
-</li><!-- #comment-## -->
+<!-- #comment-## -->
<li class="comment even thread-even depth-1" id="li-comment-2842">
<div id="comment-2842">
<div class="comment-author vcard">
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/year-in-review/" rel="ugc">Year in Review | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/installing-email-with-postfix-and-dovecot/" rel="ugc">Installing email with Postfix and Dovecot (with Postgres) - Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/paper-archival/" rel="ugc">Paper archival | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/year-in-review/" rel="ugc">Year in Review | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/wip-dead-tree-publishing-3/" rel="ugc">WIP: Dead Tree Publishing 3 | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
</div>
<!-- comments -->
-<ol class="commentlist">
-<li class="post pingback">
-<p>Pingback: <a class="url" href="https://blog.za3k.com/wip-dead-tree-publishing-2/" rel="ugc">WIP: Dead Tree Publishing 2 | Optimal Prime</a></p>
-</li><!-- #comment-## -->
-</ol>
\ No newline at end of file
Ithenalin’s Restoration by Lawrence Watt-Evans
Lament by Maggie Stiefvater
Legacy of the Fallen by Luke Chmilenko p1-316
-**[Lone Wolf](https://www.projectaon.org/en/Main/Books) / Kai adventure series 1-5, magnakai 1, by Joe Dever
-**Magic for Liars by Sarah Gailey
+**[Lone Wolf](https://www.projectaon.org/en/Main/Books) / Kai adventure series 1-5, magnakai 1, by Joe Dever**
+Magic for Liars by Sarah Gailey
Magician by Raymond Feist
Magicians by Lev Grossman
Making Money by Terry Pratchett
Snowspelled by Stephanie Burges
Spellmonger by Terry Mancour, p1-165
Starfish by Peter Watts
-**Stone Unturned by Lawrence Watt-Evans
-**Storm Glass by Jeff Wheeler
-**Sufficiently Advanced Magic by Andrew Rowe
-**The Alien’s Lover by Zoey Draven
+**Stone Unturned by Lawrence Watt-Evans**
+Storm Glass by Jeff Wheeler
+**Sufficiently Advanced Magic by Andrew Rowe**
+The Alien’s Lover by Zoey Draven
The Archived by Victoria Schwab
The Atrocity Archive by Charles Stross
The Blood of a Dragon by Lawrence Watt-Evans
The Diamond Age by Neal Stephenson
The Fractured World by David Aries
The Goblin Emperor by Katherine Addison
-**The Library at Mount Char by Scott Hawkins
-**The Magic Goes Away by Larry Niven
+**The Library at Mount Char by Scott Hawkins**
+The Magic Goes Away by Larry Niven
The Maker of Universes by Philip Jose Farmer
The Misenchanted Sword by Lawrence Watt-Evans
The Mysterious Study of Doctor Sex by Tamsyn Muir
Forrest Mim’s Mini Notebook
Intel’s x86-64 manual
Introduction to Analysis by Maxwell Rosenlicht
-**[Kademelia](https://www.researchgate.net/publication/2492563_Kademlia_A_Peer-to-peer_Information_System_Based_on_the_XOR_Metric) by Peter Maymounkov
-**[kleiman v wright](https://library.za3k.com/law%20documents/kleiman%20v%20wright%20-%20austrialian%20taxation%20office%20findings.pdf) australian tax document
+**[Kademelia](https://www.researchgate.net/publication/2492563_Kademlia_A_Peer-to-peer_Information_System_Based_on_the_XOR_Metric) by Peter Maymounkov**
+[kleiman v wright](https://library.za3k.com/law%20documents/kleiman%20v%20wright%20-%20austrialian%20taxation%20office%20findings.pdf) australian tax document
Incremental String Searching by Bertrand Meyer (KNP algorithm)
Rules to One Night Ultimate Werewolf
The Art of Computer Programming, v1, v3 by Donald Knuth (parts)
The Pragmatic Programmer
The Rust Programming Language
-**[There’s Plenty of Room at the Bottom](https://web.pa.msu.edu/people/yang/RFeynman_plentySpace.pdf) by Richard Feynman
-**Total Money Makeover by Dave Ramsey
+**[There’s Plenty of Room at the Bottom](https://web.pa.msu.edu/people/yang/RFeynman_plentySpace.pdf) by Richard Feynman**
+Total Money Makeover by Dave Ramsey
W65025 manual (6502 clone)
Vita Nostra by Maryna and Serhiy Dyachenko
How Rory Thorne Destroyed the Multiverse by K. Eason
Malazan (Malazan 1) by Steven Erikson
-**Daughter of the Empire by Raymond Feist and Janny Wurts
-**Mistress of the Empire by Raymond Feist and Janny Wurts
+**Daughter of the Empire by Raymond Feist and Janny Wurts**
+Mistress of the Empire by Raymond Feist and Janny Wurts
Servant of the Empire by Raymond Feist and Janny Wurts
Dragon’s Egg (Cheela 1) by Robert L Forward
**[Mother of Learning](https://www.royalroad.com/fiction/21220/mother-of-learning) by Domagoj Kurmaic/nobody103**
Bloodlines (Cradle 9) by Will Wight
Reaper (Cradle 10) by Will Wight
The Crimson Vault (Travelers Gate 2) by Will Wight
-\***Dinosaurs by Walter Jon Williams
-**Blind Lake by Robert Charles Wilson
+\***Dinosaurs by Walter Jon Williams**
+Blind Lake by Robert Charles Wilson
Thousand Li by Tao Wong
Thousand Li 2 by Tao Wong
Thousand Li 3 by Tao Wong
Aspects by John M Ford
Aurora by Kim Stanley Robinson
Aurora Rising by Amie Kaufman
-**Bastion (Immortal Great Souls 1) by Phil Tucker
-**Children of Time by Adrian Tchaikovsky
+**Bastion (Immortal Great Souls 1) by Phil Tucker**
+Children of Time by Adrian Tchaikovsky
Citadel: Training in Necessity by Unillustrated
City of Broken Magic by Mirah Bolender
Cradle 11: Dreadgod by Will Wight
Good Omens by Neil Gaiman and Terry Pratchett
Grand Game by Tom Elliot (LitRPG)
**Project Hail Mary by Andy Weir
-Head-on by John Scalzi
-**He Who Fights with Monsters 1 by Shirtaloon
+Head-on by John Scalzi**
+He Who Fights with Monsters 1 by Shirtaloon
He Who Fights with Monsters 2 by Shirtaloon
He Who Fights with Monsters 3 by Shirtaloon
He Who Fights with Monsters 4 by Shirtaloon
Insane City by Dave Barry
Iron Prince by Bryce O’Conner and Luke Chmilenko
Isolate (Grand Illusion 1) by L E Modesitt Jr
-**[The Kevin Jenkins Experience](https://deathworlders.com/books/deathworlders/chapter-00-kevin-jenkins-experience/) by Hambone
-**Kusuriya no Hitorigoto / Alchemist’s Journal by Natsu Hyuuga et al
+**[The Kevin Jenkins Experience](https://deathworlders.com/books/deathworlders/chapter-00-kevin-jenkins-experience/) by Hambone**
+Kusuriya no Hitorigoto / Alchemist’s Journal by Natsu Hyuuga et al
The Left-handed Booksellers of London by Garth Nix
Lock In by John Scalzi
Mage’s Blood by David Hair
Mazer in Prison by Orson Scot Card
Memory of Earth by Orson Scott Card
Memory of Earth 2: Call of Earth by Orson Scott Card
-**Millenial Mage by J L Mullins
-**Neverworld Wake by Marisha Pessl
+**Millenial Mage by J L Mullins**
+Neverworld Wake by Marisha Pessl
Orc on the Wild Side by Tom Holt
Pact by wildbow
Penric’s Progress by Louis McMaster Bujold
Starsight by Brandon Sanderson
Story of My Life by Hellen Keller
Strange and Stubborn Endurance by Foz Meadows
-A **Succession of Bad Days by Graydon Saunders
-**The Starless Sea by Eric Morgenstern
+A **Succession of Bad Days by Graydon Saunders**
+The Starless Sea by Eric Morgenstern
Termination Shock by Neal Stephenson
The Consuming Fire by John Scalzi
The Every by Dave Eggers
wordpress_id: 101
wordpress_slug: a-pixel-art
---
-[](https://blog.za3k.com/wp-content/uploads/2015/01/Screen-Shot-2015-01-13-at-11.12.20-AM.png)
+[](https://blog.za3k.com/wp-content/uploads/2015/01/Screen-Shot-2015-01-13-at-11.12.20-AM.png)
[](https://blog.za3k.com/wp-content/uploads/2024/02/fork-crop.jpg)
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2024/02/foil-crop.jpg)
[](https://blog.za3k.com/wp-content/uploads/2024/02/leaves-crop.jpg)
[](https://blog.za3k.com/wp-content/uploads/2024/02/unwrapped-crop.jpg)
+</figure>
+
Like a bread, this recipe takes a fair bit of time. I would start in the morning.
1. Soak rice and mung beans overnight. Marinate seitan or meat.
---
I condensed some of card games into one box:
-[](https://blog.za3k.com/wp-content/uploads/2023/08/cards_open-scaled.jpg)
-
-Left to right: Doomlings, Star Realms, The Mind, Chrononauts, FitzIt, Are you the traitor?, Are you a werewolf?, Hanabi, Set, Icehouse/Zendo rules, regular playing cards
+[](https://blog.za3k.com/wp-content/uploads/2023/08/cards_open-scaled.jpg)
I’ve noticed that board game boxes tend to be a little big. I combined five into one box:
-[](https://blog.za3k.com/wp-content/uploads/2023/08/box_open-scaled.jpg)
-
-Azul, Settlers of Catan, Clank, Concept, Nuclear War
-
-[](https://blog.za3k.com/wp-content/uploads/2023/08/both_closed.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2023/08/box_open-scaled.jpg)
-This is “portable” if you have a car trunk, maybe! It’s heavy as heck.
+[](https://blog.za3k.com/wp-content/uploads/2023/08/both_closed.jpg)
---
Our house has seven people, so today I made some mail holders to put on our doors.
-[](https://blog.za3k.com/wp-content/uploads/2015/09/cardboard_near0.5.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/09/cardboard_near0.5.jpg)
I basically had some long cardboard boxes, and cut them in half. Then I added new ends and separators in the middle.
wordpress_id: 313
wordpress_slug: controlling-a-computercraft-turtle-remotely
---
-[](https://blog.za3k.com/wp-content/uploads/2015/10/Screen-Shot-2015-10-18-at-7.16.59-PM.png)[](https://blog.za3k.com/wp-content/uploads/2015/10/Screen-Shot-2015-10-18-at-7.17.30-PM.png)
+[](https://blog.za3k.com/wp-content/uploads/2015/10/Screen-Shot-2015-10-18-at-7.16.59-PM.png)[](https://blog.za3k.com/wp-content/uploads/2015/10/Screen-Shot-2015-10-18-at-7.17.30-PM.png)
1. Install Redis: [https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis)
2. Install [Webdis
---
The default twitter icon is an egg. There are six available. One is chosen at random for each new user.
-[](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_1_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_2_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_3_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_4_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_5_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_6_bigger.png)
+[](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_1_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_2_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_3_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_4_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_5_bigger.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_6_bigger.png)
Hex colors for the six icons:
Large versions of those icons:
-[](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_1.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_2.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_3.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_4.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_5.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_6.png)
+[](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_1.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_2.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_3.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_4.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_5.png) [](https://blog.za3k.com/wp-content/uploads/2015/03/default_profile_6.png)
---
Today’s project was a hard drive carrying case. I wanted something to securely store hard drives. When I looked around on ebay and amazon, I saw some [nice cases](https://www.amazon.com/gp/product/B007OXK0YM/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&tag=za3k-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B007OXK0YM&linkId=350884a6d81cab8bc2fd02af3ba9ce42) and some crappy plastic molded ones. Even the terrible ones were at least $50, so I made my own.
-[](https://blog.za3k.com/wp-content/uploads/2017/07/1.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2017/07/1.jpg)
I bought a used ammo case at the rather excellent local army surplus store. Then I padded all sides. I had spare [EVA foam](https://en.wikipedia.org/wiki/Ethylene-vinyl_acetate) “puzzle piece” style mats from a gym setup lying around. I cut out the pieces with scissors. That’s it. I was expecting more steps, but nothing needed glued in place. I was planning on adding inserts for the empty slots, but it seems secure enough. If you’re making one, you could also glue the top onto the lid, so you don’t have to take it out manually.
-[](https://blog.za3k.com/wp-content/uploads/2017/07/2.v01.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2017/07/2.v01.jpg)
Let’s look inside a commercial keyboard, and see if we can hook up to it:
-[](https://blog.za3k.com/wp-content/uploads/2023/06/commercial-scaled.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2023/06/commercial-scaled.jpg)
Yikes. What’s going on? Well, let’s make our own little keyboard, and explore what’s going on. We’ll build it in three layers, or “index cards”:
If I attach alligator clips to the second horizontal screw terminal, and fourth vertical screw terminals, and wire a battery and buzzer with the terminals, I get a connection beep only when I press the key “A”:
-[](https://blog.za3k.com/wp-content/uploads/2023/06/address-scaled.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2023/06/address-scaled.jpg)
In a real computer, we obviously can’t just move alligator clips around. Instead, we attach wires to all 9 posts–three outputs wires for the horizontal lines, and six inputs for the vertical lines. We output a signal on the first horizontal line, and see if we can read it from any of the six vertical lines inputs. Then we output a signal on the second horizontal line, and see if we can read it, and so on for the third. Assuming only one key is pressed (or none), we can identify the key. This “scanning” process could be done thousands of times a second, rapidly enough that it can’t miss our slowpoke human fingers.
-[](http://falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWK0AckDMYwE4As3sA2SQgdgCYFsQFIaRd0aBTAWiwCgBncQ8bciEK4Q5XHToQALgCcArs24gi-QWFwixE8CFkKllPjkHpIm8VEt7FPMKSMDRY0Rcm75NhmAeDcwl9rSHkro6D4g6Cjmge76PKF8hhFREWaWQXFeiQh8fiKmIm7WSnbZic4F6bGeSUmVlUXBPCpJ6vlpjZneojlC7YU6xfFh4OQoySKlVUNZo+N54PbTTYtGY06TS501vWDrlVPbSip7422ry11r4-6Hg8EA7rxzytdQHE8n61On708-61a60gHx6bwSLxBTwhv1w3V+UOexleqj+KORP0ciMxglaWNBeJMI2RiJhjjh4URFLBERGSVJdN6tV6iOZRiW9NBUySLRZoN5RjKaP8Wj6qUKXI04vAUtF2NlFnOhwJzm5zjlKuiG2lpLS9TSGuhBosBy2oMimz4FoCaOtoutDVBCymC0NDBFFgWjqetyWHokHAASmL-P50IJtBYkNoYAgODIQyJbnt0vBEcnBL6+PLJimlWaE+dblKsBHwGmgzKk5MpeHLHQo-XkHGnuRVSm25b3gnO2Le6XU-BK72RRUyw26NH69AW9KB6bs-HpWG0gPJBXg5UV-lxwxJ03Y+aUvPjwWJmLrWvy0PNykwyk65H9zGZ06M+6uyCEwt-M6U+ubw-MUvV3RsX1ndg3nhYFQUg1F4XxJ44NaIUQQADxAVhxDoUIkEg0haXmFwQBkAB7B4AB0uC4ABjABDAA7KiAHNmAY5gZDoqRSJkDgACNwCQLARFwFBqFMah0JoEhwFCIRVRGcwQAAa2YABPLgHgASykGiAAsOAw2hBUnY9CCYJSAFsuJkLS0MMzDxAgMIRFYUgkDCAilIACjomipC0gA3ZgqIAG3IgAaKjSIABzYqiaNI0LQuYfyeIASgcvYCOocQCJTJTEtCuRLKYrgYrkZK5BiqiZGYLgtK4biZC4BysIwZJBHYchxJQJBJkELSysgcgRvQKipD0xqqOmrg+Mq0KuCmqQoq4OQuBCrg6KoyytJosjEoY2QkpS3iAFkgMqRgiWzURXwuh09QQG7LHIe7tQORwIToN64wevUDQoWlbt+jgLu3CIXp+97zgOFNvruuNvCYLD4SWVgwjOJYED2K16ADZjHO6UVUcSFBxgDJDqVG8ZSZtEFgwx48pSZkQTlEaToaQX7pwghCuoHElYOg2machDgpEc8ZyCB5CgbcXAZ0IbBSHUMAED6nBCDAdA2A1wcQAAE2YAAzOjKqkDhCeQ8nMO6BGvyl0RZZaeXr0RDHRptT2fvliW7dlSBaYHMW3Cw6ACEj7AxJ6tNBAQWAo+jgRCBxlAxDYagwDgI3TfN0LLetkPnHYDtXG7APNCDu2OWrgCPe5aufdEOvYNdrrw19iNYJltQWc7qsK9YUVzmHoHznrq3MLF7w6GH6u7hBSXh8VFmZ6lNwYHM0xVaoMAolIdB8EKaBU8gSOok88Q8CznPjbNi3YIH0fn7NDCx7ZgWZOwfrRhAWK2KsCKilNKMgqKBgACoABkZoMWCjIKQHFWpAA)
-
-Click to view interactive schematic (credit: Kragen)
+[](http://falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWK0AckDMYwE4As3sA2SQgdgCYFsQFIaRd0aBTAWiwCgBncQ8bciEK4Q5XHToQALgCcArs24gi-QWFwixE8CFkKllPjkHpIm8VEt7FPMKSMDRY0Rcm75NhmAeDcwl9rSHkro6D4g6Cjmge76PKF8hhFREWaWQXFeiQh8fiKmIm7WSnbZic4F6bGeSUmVlUXBPCpJ6vlpjZneojlC7YU6xfFh4OQoySKlVUNZo+N54PbTTYtGY06TS501vWDrlVPbSip7422ry11r4-6Hg8EA7rxzytdQHE8n61On708-61a60gHx6bwSLxBTwhv1w3V+UOexleqj+KORP0ciMxglaWNBeJMI2RiJhjjh4URFLBERGSVJdN6tV6iOZRiW9NBUySLRZoN5RjKaP8Wj6qUKXI04vAUtF2NlFnOhwJzm5zjlKuiG2lpLS9TSGuhBosBy2oMimz4FoCaOtoutDVBCymC0NDBFFgWjqetyWHokHAASmL-P50IJtBYkNoYAgODIQyJbnt0vBEcnBL6+PLJimlWaE+dblKsBHwGmgzKk5MpeHLHQo-XkHGnuRVSm25b3gnO2Le6XU-BK72RRUyw26NH69AW9KB6bs-HpWG0gPJBXg5UV-lxwxJ03Y+aUvPjwWJmLrWvy0PNykwyk65H9zGZ06M+6uyCEwt-M6U+ubw-MUvV3RsX1ndg3nhYFQUg1F4XxJ44NaIUQQADxAVhxDoUIkEg0haXmFwQBkAB7B4AB0uC4ABjABDAA7KiAHNmAY5gZDoqRSJkDgACNwCQLARFwFBqFMah0JoEhwFCIRVRGcwQAAa2YABPLgHgASykGiAAsOAw2hBUnY9CCYJSAFsuJkLS0MMzDxAgMIRFYUgkDCAilIACjomipC0gA3ZgqIAG3IgAaKjSIABzYqiaNI0LQuYfyeIASgcvYCOocQCJTJTEtCuRLKYrgYrkZK5BiqiZGYLgtK4biZC4BysIwZJBHYchxJQJBJkELSysgcgRvQKipD0xqqOmrg+Mq0KuCmqQoq4OQuBCrg6KoyytJosjEoY2QkpS3iAFkgMqRgiWzURXwuh09QQG7LHIe7tQORwIToN64wevUDQoWlbt+jgLu3CIXp+97zgOFNvruuNvCYLD4SWVgwjOJYED2K16ADZjHO6UVUcSFBxgDJDqVG8ZSZtEFgwx48pSZkQTlEaToaQX7pwghCuoHElYOg2machDgpEc8ZyCB5CgbcXAZ0IbBSHUMAED6nBCDAdA2A1wcQAAE2YAAzOjKqkDhCeQ8nMO6BGvyl0RZZaeXr0RDHRptT2fvliW7dlSBaYHMW3Cw6ACEj7AxJ6tNBAQWAo+jgRCBxlAxDYagwDgI3TfN0LLetkPnHYDtXG7APNCDu2OWrgCPe5aufdEOvYNdrrw19iNYJltQWc7qsK9YUVzmHoHznrq3MLF7w6GH6u7hBSXh8VFmZ6lNwYHM0xVaoMAolIdB8EKaBU8gSOok88Q8CznPjbNi3YIH0fn7NDCx7ZgWZOwfrRhAWK2KsCKilNKMgqKBgACoABkZoMWCjIKQHFWpAA)
And this is how most keyboards work. There are some special keys–Shift, Ctrl, Alt, etc might be on their very own line, since we want to detect key combos. And better keyboards can detect multiple keys being pressed at once (N-key rollover), which I think they do by having a completely separate wire to each key which multiple people tell me they do with a diode next to each key.
This was my third attempt. Here’s the second, using aluminium foil. It worked at least as well, maybe better, but it was harder to make. I just taped the foil down, taking care not to cover the contact points. I am told the aluminium will gradually oxidize, making it non-conductive.
+<figure class="wp-block-gallery has-nested-images columns-5 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2023/06/aluminium_parts-scaled.jpg)
[](https://blog.za3k.com/wp-content/uploads/2023/06/aluminium_layers-scaled.jpg)
[](https://blog.za3k.com/wp-content/uploads/2023/06/side_view-scaled.jpg)
+</figure>
+
And here’s one using graphite from drawing hard with a #2 pencil.. Graphite, it turns out, works terribly, and I couldn’t read a signal halfway down the index card. Despite what people have told me, I’m not yet convinced you can make a conductive wire out of it.
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2023/06/graphite_parts-scaled.jpg)
[](https://blog.za3k.com/wp-content/uploads/2023/06/graphite_done-scaled.jpg)
+
+</figure>
---
I’ve been prototyping an e-ink laptop.
-[](https://blog.za3k.com/wp-content/uploads/2022/10/front_view_open-scaled.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2022/10/front_view_open-scaled.jpg)
-[](https://blog.za3k.com/wp-content/uploads/2022/10/front_view-scaled.jpg)
-
-Closed “laptop”
+[](https://blog.za3k.com/wp-content/uploads/2022/10/front_view-scaled.jpg)
I’m not the first, there have been many other such devices before. I came up with the idea independently, but the specifics are heavily inspired by the [Ultimate Writer](https://alternativebit.fr/posts/ultimate-writer/) by NinjaTrappeur in 2018. Similar to him, my use case is typing without distractions, and reading books. E-ink displays are quite slow to update, so I don’t think it can serve as a general purpose computer. Here’s a video of it in action. It operates at one frame per second.
-The electronics are not fully done. They need better secured, and I’m going to redo the cabling and power back.
-
-[](https://blog.za3k.com/wp-content/uploads/2022/10/screen_closeup-scaled.jpg)
-
-I broke a screen over-tightening a nut. That said, I like this look pretty well! If the lid was thicker, I know how to avoid screws on the other side, too.
-
-[](https://blog.za3k.com/wp-content/uploads/2022/10/early_garbage-crop-scaled.jpg)
-
-Early screen progress. I got *something* to display, but not what I wanted.
+<video controls="" src="https://za3k.com/archive/eink_typing1.mp4"></video>
-[](https://blog.za3k.com/wp-content/uploads/2022/10/keyboard_closeup-scaled.jpg)
+The electronics are not fully done. They need better secured, and I’m going to redo the cabling and power back.
-I found a really nice, cheap mechanical keyboard on ebay. The main downside is that it’s heavy–730g. It also consumes heavy amounts of power, even when not in use. I have a nearly identical keyboard that doesn’t, which I’ll use for v2.
+[](https://blog.za3k.com/wp-content/uploads/2022/10/screen_closeup-scaled.jpg)
-[](https://blog.za3k.com/wp-content/uploads/2022/10/battery_back_closeup-scaled.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2022/10/early_garbage-crop-scaled.jpg)
-I made my own lithium-ion battery pack. It works well, but it doesn’t quite fit so I’m going to redo it with one less cell. It also needs an on/off switch and a right angle USB cable.
+[](https://blog.za3k.com/wp-content/uploads/2022/10/keyboard_closeup-scaled.jpg)
-[](https://blog.za3k.com/wp-content/uploads/2022/10/pi_closeup-scaled.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2022/10/battery_back_closeup-scaled.jpg)
-The prototype is powered by a Raspberry Pi 3. The final version will use a microcontroller to save power. The Pi Zero can also be swapped in with no changes, and uses a third of the power. But it’s noticeably slower and takes 30 seconds to boot. For prototyping I’m using the Pi 3 for now.
+[](https://blog.za3k.com/wp-content/uploads/2022/10/pi_closeup-scaled.jpg)
I’m not the best woodworker, but I’m slowly learning. Here are pictures of case and lid action.
-[](https://blog.za3k.com/wp-content/uploads/2022/10/added_back_stops-scaled.jpg)
-
-Hinged lid. The screen is on the bottom of the lid.
-
-[](https://blog.za3k.com/wp-content/uploads/2022/10/back_stop-scaled.jpg)
-
-A wooden stop on each side
-
-[](https://blog.za3k.com/wp-content/uploads/2022/10/back_stop_action-scaled.jpg)
-
-Wooden stop with lid open. It hits the bottom, bringing the lid/screen to a rest at vertical.
+[](https://blog.za3k.com/wp-content/uploads/2022/10/added_back_stops-scaled.jpg)
-[](https://blog.za3k.com/wp-content/uploads/2022/10/hinge-scaled.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2022/10/back_stop-scaled.jpg)
-Latches on the side
+[](https://blog.za3k.com/wp-content/uploads/2022/10/back_stop_action-scaled.jpg)
-[](https://blog.za3k.com/wp-content/uploads/2022/10/hinge_crack-scaled.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2022/10/hinge-scaled.jpg)
-Don’t put hinges sideways into plywood. But if you do, drill big pilot holes. Out of six screw, one cracked a little.
+[](https://blog.za3k.com/wp-content/uploads/2022/10/hinge_crack-scaled.jpg)
On the software end, shout outs to:
---
Lashed furniture is made using sticks and rope or twine. Today’s project was to make one out of bamboo and brown paracord. The frame is shown–imagine boards or many pieces of bamboo forming a top.
-[](https://blog.za3k.com/wp-content/uploads/2023/11/table.jpg)
-
-Hello to the young lady who decided to pose and join in the photo!
+[](https://blog.za3k.com/wp-content/uploads/2023/11/table.jpg)
We found this little $5 tool to be incredibly good for cutting bamboo. It’s designed for almost the same thing, cutting metal pipes.
The visuals are pretty much the same. Incidentally I discovered the striations on the ground disappear if we increase the floating point precision.
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2023/11/v15b.png)
[](https://blog.za3k.com/wp-content/uploads/2023/11/v16.png)
+</figure>
+
Render on the GPU is 30x faster (0.05 fps -> 3 fps). That’s still not very fast.
I didn’t get video working yesterday, or anything else visually new. I will call this one a failure overall, because I have nothing interesting to show off. I learned stuff and made progress though, so it’s not so bad.
Mine is based on the explanation (and code) from “[Ray Tracing in One Weekend](https://raytracing.github.io/books/RayTracingInOneWeekend.html)“, and the code from “[My Very First Raytracer](http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytracer.html)“.
-[](https://github.com/za3k/ha3k-02)
-
-Matte spheres in different shades of grey. The blue in the spheres is reflected from the sky.
+[](https://github.com/za3k/ha3k-02)
The motivation for this project was to learn how to make things run faster on a graphics card. I quickly realized (before I wrote a line of code) that I’d need the basic raytracer to be its own project. Having it run faster will have to be a job for another day!
-[](https://github.com/za3k/ha3k-02)
-
-A final demo scene, showing off reflectivity and metal surfaces.
-Note the pincushion distortion of the overall render, and striations on the ground.
+[](https://github.com/za3k/ha3k-02)
To my surprise, after a little jiggling I got it down to a one-layer design.
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2023/11/kicad-pcb2.png)
+</figure>
+
That means home-printing would be much easier. No having to line up the two sides carefully.
[](https://blog.za3k.com/wp-content/uploads/2023/11/printable.png)
First, I tried laminating it. Almost no ink transferred, and the paper came off easily. Then I tried ironing it, but the paper stick to the iron and not to the PCB. The tape melted on the iron. For both, I dunked them in water after, which is supposed to help loosen the paper.
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2023/11/image.png)
[](https://blog.za3k.com/wp-content/uploads/2023/11/image-2.png)
[](https://blog.za3k.com/wp-content/uploads/2023/11/image-4.png)
+</figure>
+
Next, I tried the standard advice–sand the PCBs (I used 320 grit) and use glossy paper. This time, both pieces of paper stuck very well. I was wary about the iron coming off again, so I just left it on place on the highest heat–this worked fine for adhesion, but I had to iron out wrinkles at the end. The laminated piece had lose edges, while the ironed piece was on there totally flat.
I tried peeling off the laminated paper–oops! It peeled back and most of the ink stayed on the paper. I think if I took it off more carefully, it would have worked.
---
Thursday’s project was [Hack-A-Clock](https://tilde.za3k.com/hackaday/clock/) ([demo](https://tilde.za3k.com/hackaday/clock/), [source](https://github.com/za3k/day24_clock)). It is a decimal time clock, displaying the time in revolutionary french time (minus their weird calendar).
-[](https://blog.za3k.com/wp-content/uploads/2022/11/screenshot-21.png)
-
-[https://tilde.za3k.com/hackaday/clock/](https://tilde.za3k.com/hackaday/clock/)
+[](https://blog.za3k.com/wp-content/uploads/2022/11/screenshot-21.png)
This is another “phone it in” project but I think it would have been okay with more accompanying explanation and better styling.
wordpress_id: 225
wordpress_slug: irc
---
-[](https://blog.za3k.com/wp-content/uploads/2015/06/2015-06-28-021223_683x381.jpg)I added an IRC server to my growing list of services. You can access it at:
+[](https://blog.za3k.com/wp-content/uploads/2015/06/2015-06-28-021223_683x381.jpg)I added an IRC server to my growing list of services. You can access it at:
- irc.za3k.com
- Port 6667
First, each player picks a Meeple to be their character’s mini.
-[](https://blog.za3k.com/wp-content/uploads/2023/07/board-crop.jpg)
-
-Four PCs on a wagon move over swampy terrain.
+[](https://blog.za3k.com/wp-content/uploads/2023/07/board-crop.jpg)
Quick, roll initiative! The players all roll, and so do the enemies. We grab a second meeple for each player, as well as second token for each enemy. This becomes the initiative tracker.
wordpress_id: 84
wordpress_slug: money-orders
---
-[](https://blog.za3k.com/wp-content/uploads/2014/12/Figure6.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2014/12/Figure6.jpg)
A postal money order
wordpress_id: 104
wordpress_slug: moreorcs-com
---
-[](http://moreorcs.com)
+[](http://moreorcs.com)
My newest site: [http://moreorcs.com/](http://moreorcs.com/)
- No…
- No, and…
-[](https://blog.za3k.com/wp-content/uploads/2015/04/cube.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/04/cube.jpg)
Their example:
The calendar has anything that needs to be done on a specific day. Birthday reminders, doctor’s appointments, and weekly activities like board game night or trash day. You’ve seen calendars. This is nothing interesting.
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2023/07/weekly-crop.jpg)
[](https://blog.za3k.com/wp-content/uploads/2023/07/cal-crop.jpg)
+</figure>
+
**A yearly goals list**
A yearly list of my goals for the year. I typically have 5-15 goals, and finish half of them.
wordpress_id: 988
wordpress_slug: painting
---
-[](https://blog.za3k.com/wp-content/uploads/2023/02/waves.jpg)
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
-Waves, Z Vance 2023
+[](https://blog.za3k.com/wp-content/uploads/2023/02/waves.jpg)
-[](https://blog.za3k.com/wp-content/uploads/2023/02/small.jpg)
+</figure>
-Bouquet, Z Vance 2023
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
-[](https://blog.za3k.com/wp-content/uploads/2023/02/art1-crop.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2023/02/small.jpg)
-Worm Statue, Z Vance 2023
+</figure>
-[](https://blog.za3k.com/wp-content/uploads/2023/02/statue1-crop.jpg)
+<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
-Model
+[](https://blog.za3k.com/wp-content/uploads/2023/02/art1-crop.jpg)
+
+[](https://blog.za3k.com/wp-content/uploads/2023/02/statue1-crop.jpg)
+
+</figure>
wordpress_id: 334
wordpress_slug: pixel-alphabet
---
-[](https://blog.za3k.com/wp-content/uploads/2015/10/Alphabetx16.png)A small font I designed. I’m pretty proud of it.
+[](https://blog.za3k.com/wp-content/uploads/2015/10/Alphabetx16.png)A small font I designed. I’m pretty proud of it.
wordpress_id: 112
wordpress_slug: pixel-art-a-cool-cat
---
-[](https://blog.za3k.com/wp-content/uploads/2015/02/Screen-Shot-2015-02-03-at-9.16.08-PM.png)
+[](https://blog.za3k.com/wp-content/uploads/2015/02/Screen-Shot-2015-02-03-at-9.16.08-PM.png)
---
I made a minimal, printable [TODO list](https://za3k.com/archive/todo.pdf). Enjoy!
-[](https://za3k.com/archive/todo.pdf)
+[](https://za3k.com/archive/todo.pdf)
-Just print it
-
-[](https://za3k.com/archive/todo.pdf)
-
-or get fancy and laminate
+[](https://za3k.com/archive/todo.pdf)
A geodesic dome, I learned, is related to the *icosahedron*, or d20 from RPGs.
+<figure class="wp-block-gallery has-nested-images columns-default wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex" markdown="1">
+
[](https://blog.za3k.com/wp-content/uploads/2024/06/image.png)
[](https://blog.za3k.com/wp-content/uploads/2024/06/image-1.png)
[](https://blog.za3k.com/wp-content/uploads/2024/06/image-3.png)
-A simple dome is the top half of the icosahedron. As they get more complex, you divide each triangle into more and more smaller triangles.
+</figure>
-[](https://blog.za3k.com/wp-content/uploads/2024/06/sphere-crop.jpg)
+A simple dome is the top half of the icosahedron. As they get more complex, you divide each triangle into more and more smaller triangles.
-Icosahedron getting more and more detailed. Geodesic domes are the top half of each sphere.
+[](https://blog.za3k.com/wp-content/uploads/2024/06/sphere-crop.jpg)
So to make a nice geodesic dome, we could find one (I failed), make one in Blender (too hard), or use some math to generate one in Godot. And to do that math, we need to know the list of 20 icosahedron faces. Which basically just needs the list of the 12 vertices!
wordpress_id: 341
wordpress_slug: roasted-chickpeas
---
-[](https://blog.za3k.com/wp-content/uploads/2015/10/roasted.jpg)Here’s how you make roasted chickpeas (aka garbanzo beans):
+[](https://blog.za3k.com/wp-content/uploads/2015/10/roasted.jpg)Here’s how you make roasted chickpeas (aka garbanzo beans):
1. Set the oven to 400F.
2. Drain and empty a can or so of chickpeas into a collander and wash them
The input is some raw scans. They could be handwritten notes, printed computer documents, photos, or whatever.
-[](https://github.com/za3k/scan-organizer/blob/master/screenshots/sample_image.jpg)
+[](https://github.com/za3k/scan-organizer/blob/master/screenshots/sample_image.jpg)
The final product is that for each file like `ticket.jpg`, we end up with `ticket.txt`. This has metadata about the file (tags, category, notes) and a transcription of any text in the image, to make it searchable with `grep` & co.
### [](https://github.com/za3k/scan-organizer#phase-1-rotating-and-cropping)Phase 1: Rotating and Cropping
-[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase1.png)
+[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase1.png)
First, I clean up the images. Crop them, rotate them if they’re not facing the right way. I can rotate images with keyboard shortcuts, although there are also buttons at the bottom. Once I’m done, I press a button, and *scan-organizer* advanced to the next un-cleaned photo.
### [](https://github.com/za3k/scan-organizer#phase-2-sorting-into-folders)Phase 2: Sorting into folders
-[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase2.png)
+[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase2.png)
Next, I sort things into folders, or “categories”. As I browse folders, I can preview what’s already in that folder.
### [](https://github.com/za3k/scan-organizer#phase-3-renaming-images)Phase 3: Renaming Images
-[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase3.png)
+[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase3.png)
Renaming images comes next. For convenience, I can browse existing images in the folder, to help name everything in a standard way.
### [](https://github.com/za3k/scan-organizer#phase-4-tagging-images)Phase 4: Tagging images
-[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase4.png)
+[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase4.png)
I tag my images with the type of text. They might be handwritten. Or they might be printed computer documents. You can imagine extending the process with other types of tagging for your use case.
### [](https://github.com/za3k/scan-organizer#phase-5-transcribing-by-hand)Phase 5: Transcribing by hand
-[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase5.png)
+[](https://github.com/za3k/scan-organizer/blob/master/screenshots/phase5.png)
I write up all my handwritten documents. I have not found any useful handwriting recognition software. I just do it all by hand.
wordpress_id: 193
wordpress_slug: steak-tartare-3
---
-[](https://blog.za3k.com/wp-content/uploads/2015/04/steak-tartare.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/04/steak-tartare.jpg)
Recipe is mostly from [Tricia](http://triciaroxanne.wordpress.com).
Ingredients:
I thought, if these books are just a local convenience for an online version, it’s more artistically satisfying to have some representation of that. So I printed up a card catalog of all my books, both the ones I have digital copies of and not:
-[](https://blog.za3k.com/wp-content/uploads/2014/11/sample_card.png)
+[](https://blog.za3k.com/wp-content/uploads/2014/11/sample_card.png)
An example catalog card
That’s what a card looks like. There’s information about the book up top, and a link in the form of a [QR code](http://en.wikipedia.org/wiki/QR_code "QR code") in the middle. The link downloads a PDF version of that book. Obviously being a programmer, the cards all all automatically generated.
-[](https://blog.za3k.com/wp-content/uploads/2014/11/book.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2014/11/book.jpg)
Book with a card inside
For the books where I have a physical copy, I put the card in the book, and it feels like I’m touching the digital copy. My friends can pirate their own personal version of the book (saving me the sadness of lost lent-out books I’m sure we’ve all felt at times). And I just thing it looks darn neat. Some physical books I don’t have a digital version of, since the world is not yet perfect. But at least I can identify them at a glance (and consider sending them off to a service like [http://1dollarscan.com/](http://1dollarscan.com/))
-[](https://blog.za3k.com/wp-content/uploads/2014/11/catalog.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2014/11/catalog.jpg)
Card catalog of digital books
wordpress_id: 279
wordpress_slug: tiny-cute-vampire-bat
---
-[](https://blog.za3k.com/wp-content/uploads/2015/10/vampire-bat-x16.png)
+[](https://blog.za3k.com/wp-content/uploads/2015/10/vampire-bat-x16.png)
Made using [Piskell](http://www.piskelapp.com/)
---
I wanted a partition to divide my room, and I had a whiteboard sitting around. I sawed it into three parts, and connected them with hinges:
-
+
folding whiteboard
-
+
hinge (front)
-
+
hinge (back)
I’m a little embarrassed at having done all this, since it was obvious as soon as I started the partition was way too short to work. I figured I’d still get some experience woodworking (this is my first project). Here’s where it went:
-
+
and I never saw it again
wordpress_id: 282
wordpress_slug: whoosh
---
-[](https://blog.za3k.com/wp-content/uploads/2015/10/action-potato.png)
+[](https://blog.za3k.com/wp-content/uploads/2015/10/action-potato.png)
Action Potato
wordpress_id: 288
wordpress_slug: whsh
---
-[](https://blog.za3k.com/wp-content/uploads/2015/10/Space-Action-Potato-2-big.gif)
+[](https://blog.za3k.com/wp-content/uploads/2015/10/Space-Action-Potato-2-big.gif)
In space no one car hear “whoosh” sounds but action potato is so cool you still can mostly.
Next up I have to clean the site up, because it looks like this:
-[](https://blog.za3k.com/wp-content/uploads/2015/04/20150402.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/04/20150402.jpg)
I’ll also add HTTPS.
---
Compared with [last update](https://blog.za3k.com/wip-dead-tree-publishing-2/ "WIP: Dead Tree Publishing 2"), the Dead Tree Publishing website is looking nicer.
-[](https://blog.za3k.com/wp-content/uploads/2015/04/2015-04-16-184416_1366x768.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/04/2015-04-16-184416_1366x768.jpg)
Looking better
---
I consider Dead Tree Publishing to be **G**ood **E**nough at this point. It’s launched.
-[](https://blog.za3k.com/wp-content/uploads/2015/04/2015-04-30-180400_1366x768.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/04/2015-04-30-180400_1366x768.jpg)
New site style, FAQ page
First you upload a PDF:
-[](https://blog.za3k.com/wp-content/uploads/2015/03/1.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/03/1.jpg)
Uploading a book
Then I tell you what your ordering options are (hardcover, softcover, color), and what they cost. I’m also supposed to ask you your address to ship the book, and for you to pay for it, but those aren’t done yet.
-[](https://blog.za3k.com/wp-content/uploads/2015/03/1.jpg)
+[](https://blog.za3k.com/wp-content/uploads/2015/03/1.jpg)
Book-buying options
Or how to attach headers to the inside of an existing keyboard, which looks like this–:
-
+
But I found a project called [GOLEM](https://golem.hu/guide/keyboard-build-logs/) with an excellent guide to making your own keyboard. Here is their wiring: