danielmoch.com

Static site for www.danielmoch.com
git clone git://git.danielmoch.com/danielmoch.com.git
Log | Files | Refs | LICENSE

commit cf4217354ccf0dc6114f234e1264333377fcfbb3
parent cb2542e91607dd0ea31384f929dbb8b31525d4a4
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun, 21 Nov 2021 07:26:21 -0500

Remove unecessary whitespace

Diffstat:
M.gitignore | 1+
MDagfile | 7++++---
MMakefile | 23+++++++++++++++++++----
Afiles/robots.txt | 4++++
Dsrc/2018/11/zsh-compinit-rtfm.md | 117-------------------------------------------------------------------------------
Rsrc/2017/02/how-sadness-could-save-the-world.md -> src/posts/2017/02/how-sadness-could-save-the-world.md | 0
Rsrc/2018/03/a-eulogy-for-my-grandmother.md -> src/posts/2018/03/a-eulogy-for-my-grandmother.md | 0
Rsrc/2018/03/structural-problems-with-for-profit-social-media.md -> src/posts/2018/03/structural-problems-with-for-profit-social-media.md | 0
Rsrc/2018/03/traveling-with-the-good-and-the-bad.md -> src/posts/2018/03/traveling-with-the-good-and-the-bad.md | 0
Rsrc/2018/04/facebook-defends-universal-data-collection.md -> src/posts/2018/04/facebook-defends-universal-data-collection.md | 0
Rsrc/2018/04/the-mozilla-foundation-on-a-healthy-internet.md -> src/posts/2018/04/the-mozilla-foundation-on-a-healthy-internet.md | 0
Rsrc/2018/06/a-letter-to-senator-rubio.md -> src/posts/2018/06/a-letter-to-senator-rubio.md | 0
Rsrc/2018/10/getting-started-on-mastodon.md -> src/posts/2018/10/getting-started-on-mastodon.md | 0
Rsrc/2018/10/hardening-services-with-systemd.md -> src/posts/2018/10/hardening-services-with-systemd.md | 0
Rsrc/2018/10/new-website-backend.md -> src/posts/2018/10/new-website-backend.md | 0
Asrc/posts/2018/11/zsh-compinit-rtfm.md | 113+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsrc/2018/12/you-should-be-using-tags-in-vim.md -> src/posts/2018/12/you-should-be-using-tags-in-vim.md | 0
Rsrc/2019/07/using-qemu-without-pulling-your-hair-out.md -> src/posts/2019/07/using-qemu-without-pulling-your-hair-out.md | 0
Rsrc/2020/07/announcing-xhotplug.md -> src/posts/2020/07/announcing-xhotplug.md | 0
Rsrc/2020/09/how-to-survive-in-a-crisis.md -> src/posts/2020/09/how-to-survive-in-a-crisis.md | 0
Asrc/posts/2020/09/regarding-semantic-versioning.md | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtemplates/header.html | 44--------------------------------------------
Dtemplates/index.html | 206-------------------------------------------------------------------------------
Atemplates/landing_footer.html | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atemplates/landing_header.html | 47+++++++++++++++++++++++++++++++++++++++++++++++
Rtemplates/footer.html -> templates/post_footer.html | 0
Atemplates/post_header.html | 48++++++++++++++++++++++++++++++++++++++++++++++++
27 files changed, 400 insertions(+), 374 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1 +1,2 @@ target/ +index.db diff --git a/Dagfile b/Dagfile @@ -2,14 +2,15 @@ target "target" { source "src" { extension .md { suffix /index.html { - require "templates/header.html" - require "templates/footer.html" + require "templates/post_header.html" + require "templates/post_footer.html" filter 'm4 -DDESCRIPTION="$(lowdown -Xdescription -Tterm $<)" -DPAGE_TITLE="$(lowdown -Xtitle -Tterm $<)" -DSLUG=https://www.danielmoch.com/$(echo $< | sed "s/^src\///;s/\.md//")/ $1 >$>' filter "lowdown -Thtml $< >>$>" filter "cat <$2 >>$>" + filter 'dagindex -Av -a"$(lowdown -Xauthor -Tterm $<)" -c"$(lowdown -Xcategory -Tterm $<)" -d"$(lowdown -Xdescription -Tterm $<)" -p "$(lowdown -Xdate -Tterm $<)" -s $(echo $< | sed "s/^src\///;s/\.md//")/ -t "$(lowdown -Xtitle -Tterm $<)" -u $(stat -f%m $<)' } suffix .pdf { - filter "lowdown -Tms $< | /usr/local/bin/groff -ms -t -Tpdf >$>" + filter "lowdown -sTms --nroff-no-numbered $< | 9 sed 's/\.AU /.AU\n/' | pdfroff -itk -mspdf >$>" } } extension .scss { diff --git a/Makefile b/Makefile @@ -1,13 +1,28 @@ # See LICENSE file for copyright and license details .POSIX: -all: +all: dag target/index.html target/sitemap.xml target/rss.xml + +target/index.html: index.db templates/landing_header.html templates/landing_footer.html + cat templates/landing_header.html >$@ + dagindex -Gohtml >>$@ + cat templates/landing_footer.html >>$@ + +target/sitemap.xml: index.db + dagindex -Gositemap -f https://www.danielmoch.com >$@ + +target/rss.xml: index.db + dagindex -Gorss -t "Daniel Moch's Weblog" -f 'https://www.danielmoch.com' \ + -d "Daniel Moch's Weblog" -r 'https://www.danielmoch.com/rss.xml' -l en \ + -c 'Contents © 2021 Daniel Moch, CC BY-SA 4.0 License' >$@ + +dag: dag serve: - python -m http.server -d target -b 127.0.0.1 8000 + python3 -m http.server -d target -b 127.0.0.1 8000 clean: - rm -rf target + rm -rf target index.db -.PHONY: all clean serve +.PHONY: all clean dag serve diff --git a/files/robots.txt b/files/robots.txt @@ -0,0 +1,4 @@ +Sitemap: https://www.danielmoch.com/sitemap.xml + +User-Agent: * +Host: www.danielmoch.com diff --git a/src/2018/11/zsh-compinit-rtfm.md b/src/2018/11/zsh-compinit-rtfm.md @@ -1,117 +0,0 @@ -title: Zsh Compinit ... RTFM -author: Daniel Moch -copyright: 2018, Daniel Moch -date: 2018-11-09 06:04:08 UTC-05:00 -category: technology -description: Slow start times in Zsh are probably a sign of poor configuration - -This week I dealt with a problem that had been bugging me. I noticed -that the time a took to start a new [Zsh](https://www.zsh.org) -terminal session went from essentially instant to around 4 -seconds[^it]. I take some pride in running a lightweight system, so -the thought of having to wait a few seconds for my terminal emulator -to display a prompt feels like a personal affront. My system wasn't -just behaving badly, it was challenging me by way of insult. - -Accepting the challenge laid before me, I took to `my favorite search -engine`_ to see what tools were available to help me understand what -was suddenly performing so poorly. Oh, okay. [This -post](https://xebia.com/blog/profiling-zsh-shell-scripts/) says that -Zsh includes a script profiler. All I need to do is turn it on in my -``.zshrc`` file, like so: - - zmodload zsh/zprof - -Maybe this challenge won't be so challenging after all. So I restart my -shell and run the ``zprof`` command, and I see this:: - - num calls time self name - ----------------------------------------------------------------------------------- - 1) 1 203.91 203.91 45.30% 203.91 203.91 45.30% compdump - 2) 744 109.84 0.15 24.40% 109.84 0.15 24.40% compdef - 3) 1 448.41 448.41 99.62% 108.01 108.01 24.00% compinit - 4) 2 26.75 13.38 5.94% 26.75 13.38 5.94% compaudit - 5) 1 1.37 1.37 0.30% 1.37 1.37 0.30% colors - 6) 2 0.12 0.06 0.03% 0.12 0.06 0.03% set_title - 7) 1 0.15 0.15 0.03% 0.08 0.08 0.02% preexec - 8) 1 0.07 0.07 0.02% 0.03 0.03 0.01% precmd - -Okay, so initializing the completion system (i.e., all of the items with -names beginning with "comp") is taking a combined 99.64% of the startup -time. No need to do any fancy pareto analysis here. Something is getting -borked initializing Zsh's much-vaunted completion system. - -So I [DuckDuckWent](https://duckduckgo.com)[^jk] and found some -results that purported to fix the issue, except that they really only -half fixed it for me (literally cutting my start time in half ... an -improvement for sure, but not good enough). All of the advice[^ad] -seemed to point in the same direction, which was basically: - - autoload -Uz compinit - if [ $(date +'%j') != $(stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then - compinit - else - compinit -C - fi - -The effect of which is to only check ``.zcompdump`` when it's more than -24 hours old, and otherwise to simply initialize the completion system -without referring to it. But wait, why should this be necessary? The -whole point of ``.zcompdump`` is to speed up compinit. If ignoring it -becomes the fix for slow compinit, then why should I ever use it? - -So I read the effing manual, and indeed my instincts were correct. To -quote: - -> To speed up the running of compinit, it can be made to produce a -> dumped configuration that will be read in on future invocations. ... -> The dumped file is .zcompdump ... - -But why is it not working the way the manual describes? And why do so -many other people seem to see similar behavior to me? Let's read a -little further. - -> If the number of completion files changes, compinit will recognise -> this and produce a new dump file. - -Aha! So by implication one needs to be careful how they go about -initializing the completion system. If you do something stupid like, -say, eval a completion script (effectively initializing the completion -system) before you update your ``fpath``[^fp]_ and otherwise run -``compinit``, then the number of completion files Zsh sees will differ -by one between when you eval the completion script and when you later -call ``compinit``, meaning you'll fully run ``compdump`` every time you -source your ``.zshrc`` ... twice. - -Once I understood this, the fix was obvious. Take the completion script -I was manually eval-ing, turn it into a function script, and add it to -my ``fpath`` before running ``compinit`` so it gets picked up with the -rest of the completion system initialization. Now the ``.zcompdump`` -isn't updated every time a spawn a new shell, and the initialization -time dropped down to 60-90 ms for an improvement of over 90% in the -worst case. - -Sidebar: Oh My Zsh ------------------- - -[Oh My Zsh](https://ohmyz.sh/) seems by all accounts to be a very -popular framework for managing your Zsh configuration, but while I -don't personally use it, my impression is that it gives you enough -rope to hang yourself with in this respect. I could see how it would -be easy were I to source a bunch of third-party helper scripts in my -``.zshrc`` that were written by a half-dozen different people for the -completion system initialization to end up in a similar state. Just -something to keep in mind if the themes, plugins, and other candy -offered by Oh My Zsh is too much for you to pass up. - -[^it]: Later measurement indicated the actual time was 1.0-1.5s, but -either way it felt like forever. - -[^jk]: https://octodon.social/@jordyd/100189663891719203 - -[^ad]: Probably the best written example I found was at -https://carlosbecker.com/posts/speeding-up-zsh/, from which I pulled -the above quote. - -[^fp]: ``fpath`` is the Zsh function path, which is similar to your -system path, but for sourcing function scripts rather than executables diff --git a/src/2017/02/how-sadness-could-save-the-world.md b/src/posts/2017/02/how-sadness-could-save-the-world.md diff --git a/src/2018/03/a-eulogy-for-my-grandmother.md b/src/posts/2018/03/a-eulogy-for-my-grandmother.md diff --git a/src/2018/03/structural-problems-with-for-profit-social-media.md b/src/posts/2018/03/structural-problems-with-for-profit-social-media.md diff --git a/src/2018/03/traveling-with-the-good-and-the-bad.md b/src/posts/2018/03/traveling-with-the-good-and-the-bad.md diff --git a/src/2018/04/facebook-defends-universal-data-collection.md b/src/posts/2018/04/facebook-defends-universal-data-collection.md diff --git a/src/2018/04/the-mozilla-foundation-on-a-healthy-internet.md b/src/posts/2018/04/the-mozilla-foundation-on-a-healthy-internet.md diff --git a/src/2018/06/a-letter-to-senator-rubio.md b/src/posts/2018/06/a-letter-to-senator-rubio.md diff --git a/src/2018/10/getting-started-on-mastodon.md b/src/posts/2018/10/getting-started-on-mastodon.md diff --git a/src/2018/10/hardening-services-with-systemd.md b/src/posts/2018/10/hardening-services-with-systemd.md diff --git a/src/2018/10/new-website-backend.md b/src/posts/2018/10/new-website-backend.md diff --git a/src/posts/2018/11/zsh-compinit-rtfm.md b/src/posts/2018/11/zsh-compinit-rtfm.md @@ -0,0 +1,113 @@ +title: Zsh Compinit ... RTFM +author: Daniel Moch +copyright: 2018, Daniel Moch +date: 2018-11-09 06:04:08 UTC-05:00 +category: technology +description: Slow start times in Zsh are probably a sign of poor configuration + +This week I dealt with a problem that had been bugging me. I noticed +that the time a took to start a new [Zsh](https://www.zsh.org) +terminal session went from essentially instant to around 4 +seconds[^it]. I take some pride in running a lightweight system, so +the thought of having to wait a few seconds for my terminal emulator +to display a prompt feels like a personal affront. My system wasn't +just behaving badly, it was challenging me by way of insult. + +Accepting the challenge laid before me, I took to `my favorite search +engine`_ to see what tools were available to help me understand what +was suddenly performing so poorly. Oh, okay. [This +post](https://xebia.com/blog/profiling-zsh-shell-scripts/) says that +Zsh includes a script profiler. All I need to do is turn it on in my +``.zshrc`` file, like so: + + zmodload zsh/zprof + +Maybe this challenge won't be so challenging after all. So I restart my +shell and run the ``zprof`` command, and I see this:: + + num calls time self name + ----------------------------------------------------------------------------------- + 1) 1 203.91 203.91 45.30% 203.91 203.91 45.30% compdump + 2) 744 109.84 0.15 24.40% 109.84 0.15 24.40% compdef + 3) 1 448.41 448.41 99.62% 108.01 108.01 24.00% compinit + 4) 2 26.75 13.38 5.94% 26.75 13.38 5.94% compaudit + 5) 1 1.37 1.37 0.30% 1.37 1.37 0.30% colors + 6) 2 0.12 0.06 0.03% 0.12 0.06 0.03% set_title + 7) 1 0.15 0.15 0.03% 0.08 0.08 0.02% preexec + 8) 1 0.07 0.07 0.02% 0.03 0.03 0.01% precmd + +Okay, so initializing the completion system (i.e., all of the items with +names beginning with "comp") is taking a combined 99.64% of the startup +time. No need to do any fancy pareto analysis here. Something is getting +borked initializing Zsh's much-vaunted completion system. + +So I [DuckDuckWent](https://duckduckgo.com)[^jk] and found some +results that purported to fix the issue, except that they really only +half fixed it for me (literally cutting my start time in half ... an +improvement for sure, but not good enough). All of the advice[^ad] +seemed to point in the same direction, which was basically: + + autoload -Uz compinit + if [ $(date +'%j') != $(stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then + compinit + else + compinit -C + fi + +The effect of which is to only check ``.zcompdump`` when it's more than +24 hours old, and otherwise to simply initialize the completion system +without referring to it. But wait, why should this be necessary? The +whole point of ``.zcompdump`` is to speed up compinit. If ignoring it +becomes the fix for slow compinit, then why should I ever use it? + +So I read the effing manual, and indeed my instincts were correct. To +quote: + +> To speed up the running of compinit, it can be made to produce a +> dumped configuration that will be read in on future invocations. ... +> The dumped file is .zcompdump ... + +But why is it not working the way the manual describes? And why do so +many other people seem to see similar behavior to me? Let's read a +little further. + +> If the number of completion files changes, compinit will recognise +> this and produce a new dump file. + +Aha! So by implication one needs to be careful how they go about +initializing the completion system. If you do something stupid like, +say, eval a completion script (effectively initializing the completion +system) before you update your ``fpath``[^fp]_ and otherwise run +``compinit``, then the number of completion files Zsh sees will differ +by one between when you eval the completion script and when you later +call ``compinit``, meaning you'll fully run ``compdump`` every time you +source your ``.zshrc`` ... twice. + +Once I understood this, the fix was obvious. Take the completion script +I was manually eval-ing, turn it into a function script, and add it to +my ``fpath`` before running ``compinit`` so it gets picked up with the +rest of the completion system initialization. Now the ``.zcompdump`` +isn't updated every time a spawn a new shell, and the initialization +time dropped down to 60-90 ms for an improvement of over 90% in the +worst case. + +Sidebar: Oh My Zsh +------------------ + +[Oh My Zsh](https://ohmyz.sh/) seems by all accounts to be a very +popular framework for managing your Zsh configuration, but while I +don't personally use it, my impression is that it gives you enough +rope to hang yourself with in this respect. I could see how it would +be easy were I to source a bunch of third-party helper scripts in my +``.zshrc`` that were written by a half-dozen different people for the +completion system initialization to end up in a similar state. Just +something to keep in mind if the themes, plugins, and other candy +offered by Oh My Zsh is too much for you to pass up. + +[^it]: Later measurement indicated the actual time was 1.0-1.5s, but either way it felt like forever. + +[^jk]: https://octodon.social/@jordyd/100189663891719203 + +[^ad]: Probably the best written example I found was at https://carlosbecker.com/posts/speeding-up-zsh/, from which I pulled the above quote. + +[^fp]: ``fpath`` is the Zsh function path, which is similar to your system path, but for sourcing function scripts rather than executables diff --git a/src/2018/12/you-should-be-using-tags-in-vim.md b/src/posts/2018/12/you-should-be-using-tags-in-vim.md diff --git a/src/2019/07/using-qemu-without-pulling-your-hair-out.md b/src/posts/2019/07/using-qemu-without-pulling-your-hair-out.md diff --git a/src/2020/07/announcing-xhotplug.md b/src/posts/2020/07/announcing-xhotplug.md diff --git a/src/2020/09/how-to-survive-in-a-crisis.md b/src/posts/2020/09/how-to-survive-in-a-crisis.md diff --git a/src/posts/2020/09/regarding-semantic-versioning.md b/src/posts/2020/09/regarding-semantic-versioning.md @@ -0,0 +1,99 @@ +title: Regarding Semantic Versioning +author: Daniel Moch +copyright: 2020, Daniel Moch +date: 2020-09-11 08:51:18 UTC-04:00 +category: technology +description: Semantic Versioning is a meta-API + +So as not to bury the lede, I'll get to my point: [Semantic +Versioning](https://semver.org/) is a meta-API, and maintainers who +are cavalier about violating it can't be trusted to created stable +contracts. I've lost patience for breaking changes making their way +to my code bases without the maintainers incrementing the major +version of their projects, especially in language ecosystems where +Semantic Versioning is expected, and in such cases I'm going to +begin exploring alternative options so I can ban such libraries +from my projects---personal and professional---altogether. + +What Even Is Semantic Versioning? +--------------------------------- + +When developers adopt an external library into their code bases, they +do so knowing they will be bound in their use of the library by the +application programming interface (API). In this sense, an API can be +seen as a kind of contract between a library's maintainer and its +consumers. If a maintainer makes frequent changes to a library's API, +then that API is considered unstable. In that situation, consumers +either use the library anyway, accepting the risk that things will +break as a result of a change in the library, or they avoid it. + +Semantic Versioning seeks to ease this picture by embedding notions of +backward- and forward- compatibility into software version numbers. If +a library maintainer adheres to it, then consumers are able to upgrade +to newer versions of the library (say, to pick up bug fixes) without +fear of breaking changes, provided they aren't moving to a new, major +version. In terms of backward- and forward-compatibility, Semantic +Versioning creates an expectation that a given version of a library is +forward-compatible with any future version up to the next, major +release. A library is also backward-compatible down to the most +recent, minor release (beyond which point consumers' code _might_ +break if they are using newer library features). + +There are several benefits to using Semantic Versioning. One benefit +is that it becomes easy to codify dependency requirements into +automated dependency tools. By _assuming_ Semantic Versioning, users +of tools like NodeJS's `npm` and Rust's `cargo` are able to +specify dependency _ranges_ rather than hard-coded versions. So if a +new release of a library comes out, these tools are able to decide +automatically whether or not they can be used in a given project. In +other words, Semantic Versioning creates an opportunity for downstream +developers to easily decide whether or not to upgrade to a new version +of a library, potentially picking up important bug fixes in the +process. + +Semantic Versioning As A Meta-API +--------------------------------- + +Let me go back and unpack what I mean by calling Semantic Versioning a +meta-API. As I said above, API's represent a sort of contract between +library maintainers and downstream consumers. Semantic Versioning then +represents a sort of contract-about-the-contract. It's an agreement +regarding when and how the API will change. In a situation where +Semantic Versioning is the _de facto_ norm, as it is in the language +ecosystems mentioned above, a maintainer who chooses not to follow it +is breaking this contract, creating the risk of needless downstream +breakage. + +Because Semantic Versioning requires more contextual knowledge than +any compiler or tool chain can boast, the process is largely manual. +This means mistakes happen, and breaking changes are introduced +without rolling the major version number. Responsible maintainers will +own such mistakes and issue bug fixes to correct them, implicitly +acknowledging that the meta-API is as important as the API itself. + +Other maintainers aren't as interested as Semantic Versioning, and +seem to view it as a sort of straight jacket they would rather break +free of than a tool to promote software stability. These folks fight +against their tool chains, and indeed their entire language ecosystems, +arguing that Semantic Versioning doesn't work for them and they should +be free to work however they want. Some of their arguments are likely +stronger than others, but none of them will be ultimately compelling. + +Conclusion +---------- + +If you work in a language ecosystem where Semantic Versioning is the +_de facto_ norm, where violating it can wreak havoc downstream, then +please play nice and follow its dictates. Instead of viewing it as a +straight jacket, try to see it as an algorithm to determine what your +next release number should be. We should all like algorithms! + +If you refuse to be persuaded, then understand I will will not work +downstream from you [^dn]. I'll find a different upstream to work with +because I cannot trust you to create a stable contract. Your +willingness to conform to the meta-API is something I will take into +consideration in the future before adopting a library into any project +that I work on. I wish you well; I hope you have fun; I'll be sure to +give you a wide berth. + +[^dn]: I'll note here that I'm more forgiving in environments where Semantic Versioning is not a _de facto_ norm. diff --git a/templates/header.html b/templates/header.html @@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article#" vocab="http://ogp.me/ns" lang="en"> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="description" content="DESCRIPTION"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>PAGE_TITLE | Daniel Moch's Weblog</title> - <link href="/assets/bootstrap.min.css" rel="stylesheet" type="text/css"> - <link href="/assets/css/code.css" rel="stylesheet" type="text/css"> - <link href="/assets/css/site.css" rel="stylesheet" type="text/css"> - <meta name="theme-color" content="#155799"> - <meta name="generator" content="dag (git.danielmoch.com/dag)"> - <link rel="alternate" type="application/rss+xml" title="RSS" hreflang="en" href="/rss.xml"> - <link rel="canonical" href="SLUG"> - <link rel="icon" href="/favicon.ico" sizes="16x16"> - <link rel="icon" href="/favicon.ico" sizes="32x32"> - <link rel="icon" href="/favicon.ico" sizes="48x48"> - <link rel="icon" href="/favicon.ico" sizes="64x64"> - <link rel="icon" href="/favicon.ico" sizes="256x256"> - <link rel="next" href="/index-2.html" type="text/html"> - <meta property="og:site_name" content="Daniel Moch's Weblog"> - <meta property="og:title" content="PAGE_TITLE"> - <meta property="og:type" content="article"> - <meta property="og:image" content="https://www.danielmoch.com/assets/initials-blue.jpg"> - <meta name="twitter:card" content="DESCRIPTION"> - <meta name="twitter:creator" content="@_djmoch"> -</head> -<body> - <header class="banner"> - <div class="container no-padding"> - <nav class="col-xs-12 banner-subtitle postpromonav" style="display: flex;"> - <img src="/assets/initials-blue.png" alt="Daniel Moch's Weblog"> - <ul class="no-margin no-padding tags" style="margin-right: auto;"> - <li class="active"><a href="/">Home<span class="sr-only"> (active)</span></a></li> - <li><a href="/pages/projects">Projects</a></li> - <li><a href="https://git.danielmoch.com">Git</a></li> - </ul> - </nav> - </div> - </header> - <div class="container"> - <div class="row"> - <div class="col-xs-12 col-md-7 content"> diff --git a/templates/index.html b/templates/index.html @@ -1,206 +0,0 @@ -<!DOCTYPE html> -<html prefix=" - og: http://ogp.me/ns# article: http://ogp.me/ns/article# - " vocab="http://ogp.me/ns" lang="en"> -<head> -<meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="description" content="Daniel Moch's Weblog"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<title>Daniel Moch's Weblog</title> -<link href="/assets/bootstrap.min.css" rel="stylesheet" type="text/css"> -<link href="/assets/css/code.css" rel="stylesheet" type="text/css"> -<link href="/assets/css/site.css" rel="stylesheet" type="text/css"> -<meta name="theme-color" content="#155799"> -<meta name="generator" content="Nikola (getnikola.com)"> -<link rel="alternate" type="application/rss+xml" title="RSS" hreflang="en" href="/rss.xml"> -<link rel="canonical" href="https://www.danielmoch.com/"> -<link rel="icon" href="/favicon.ico" sizes="16x16"> -<link rel="icon" href="/favicon.ico" sizes="32x32"> -<link rel="icon" href="/favicon.ico" sizes="48x48"> -<link rel="icon" href="/favicon.ico" sizes="64x64"> -<link rel="icon" href="/favicon.ico" sizes="256x256"> -<link rel="next" href="/index-2.html" type="text/html"> -<!--[if lt IE 9]><script src="/assets/js/html5shiv-printshiv.min.js"></script><![endif]--><link rel="prefetch" href="/posts/2019/07/using-qemu-without-pulling-your-hair-out/" type="text/html"> -<meta property="og:site_name" content="Daniel Moch's Weblog"> -<meta property="og:title" content="Daniel Moch's Weblog"> -<meta property="og:type" content="website"> -<meta property="og:image" content="https://www.danielmoch.com/assets/initials-blue.jpg"> -<meta name="twitter:card" content="summary"> -<meta name="twitter:creator" content="@_djmoch"> -</head> -<body> - <header class="banner"><div class="container no-padding"> - <nav class="col-xs-12 banner-subtitle postpromonav" style="display: flex;"><img src="/assets/initials-blue.png" alt="Daniel Moch's Weblog"><ul class="no-margin no-padding tags" style="margin-right: auto;"> -<li class="active"><a href="/">Home<span class="sr-only"> (active)</span></a></li> - <li><a href="/pages/projects">Projects</a></li> - <li><a href="https://git.danielmoch.com">Git</a></li> - </ul></nav> -</div> - </header><div class="container"> - <div class="row"> - <div class="col-xs-12 col-md-7 content"> -<h1>Daniel Moch's Weblog</h1> -<h2><a class="subtle-link" href="/posts/2019/07/using-qemu-without-pulling-your-hair-out/">Using QEMU Without Pulling Your Hair Out</a></h2> -<div> -<p>I make it a rule to choose my tools carefully and to invest the time to learn -them deeply. QEMU has been one of those tools that I've wanted to learn how to -use for a long time, but was always a bit intimidated. I actually had been able -to use it indirectly via libvirt, but it felt like I was cheating my rule by -using one tool to manage another. Despite my vague sense of guilt, things -continued this way until I read a recent(ish) <a class="reference external" href="https://drewdevault.com/2018/09/10/Getting-started-with-qemu.html">introductory post on QEMU</a> by -Drew DeVault. The article is well written (as per usual for DeVault), and you'd -do well to read it before continuing here. The point is that it was the kick in -the pants I needed to finally roll up my sleeves and learn some QEMU.</p> -<p class="more"><a href="/posts/2019/07/using-qemu-without-pulling-your-hair-out/">Read more…</a></p> -</div> -<h2><a class="subtle-link" href="/posts/2018/12/you-should-be-using-tags-in-vim/">You Should Be Using Tags In Vim</a></h2> -<div> -<em>Note: This is a crosspost of an entry I wrote in this year's <a href="http://vimways.org">vimways.org</a> advent calendar. If you're -interested in Vim, I recommend you pop on over there and read the -other articles too.</em><blockquote class="epigraph"> -<p>I love you; you complete me.</p> -<ul class="simple"> -<li><p>Dr. Evil</p></li> -</ul> -</blockquote> -<p>I first came to Vim by recommendation. I was looking for a good Python -IDE (at the time I was new to the language) and one recommendation was -to use Vim with a variety of plugins added on top. That Vim could do a -lot of the things I thought only an IDE could do came as a bit of a -shock. I spent a summer as an intern using Emacs at a Unix terminal, but -didn't have enough curiosity at the time to use it any differently from -<code class="docutils literal">notepad.exe</code>. I spent that summer wishing I had automatic features for -completion, indentation, and all the things that made me appreciate -the IDE's I used in college. How naive I was!</p> -<p class="more"><a href="/posts/2018/12/you-should-be-using-tags-in-vim/">Read more…</a></p> -</div> -<h2><a class="subtle-link" href="/posts/2018/11/zsh-compinit-rtfm/">Zsh Compinit ... RTFM</a></h2> -<div> -<p>This week I dealt with a problem that had been bugging me. I noticed -that the time a took to start a new <a class="reference external" href="https://www.zsh.org">Zsh</a> terminal session went from -essentially instant to around 4 seconds <a class="footnote-reference brackets" href="/posts/2018/11/zsh-compinit-rtfm/#id5" id="id1">1</a>. I take some pride in running a -lightweight system, so the thought of having to wait a few seconds for -my terminal emulator to display a prompt feels like a personal affront. -My system wasn't just behaving badly, it was challenging me by way of -insult.</p> -<p>Accepting the challenge laid before me, I took to <a class="reference external" href="https://duckduckgo.com">my favorite search -engine</a> to see what tools were available to help me understand what was -suddenly performing so poorly. Oh, okay. <a class="reference external" href="https://xebia.com/blog/profiling-zsh-shell-scripts/">This post</a> says that Zsh -includes a script profiler. All I need to do is turn it on in my -<code class="docutils literal">.zshrc</code> file, like so:</p> -<p class="more"><a href="/posts/2018/11/zsh-compinit-rtfm/">Read more…</a></p> -</div> -<h2><a class="subtle-link" href="/posts/2018/10/getting-started-on-mastodon/">Getting Started On Mastodon</a></h2> -<div> -<p>If I've identified a trend in my social media preferences, it's that I -prefer not to use social media. That's not to say that I <em>don't</em> use it, -just that I often feel conflicted when I do. On the one hand, this is -where my friends are, and online networks have become a sort of -pseudo-public square. (My choice of words there is deliberate ... -"pseudo" as in "fake." I actually don't think online networks work as a -true replacement for a public square, but that's a post for another -time.) Skip out on social media altogether and you basically opt-out of -a lot of opportunities to rub elbows with people, which, despite all of -the good and the bad that entails, I still think is worthwhile.</p> -<p>On the other hand, popular social networks are for-profit companies that -invariably make their money by turning their users into their product, -which is packaged and sold to online advertisers. I don't know about -you, but to me that feels a bit dehumanizing. Sure, that model of -business existed long before social networks did, at least in the -abstract, but let's not kid ourselves—the way we're packaged and sold to -advertisers is far different in the hands of social networks than at any -time in history. Magazines and television networks could guess at the -kinds of readers and viewers they attracted, and companies like Nielson -could even provide some hard data to back up their guesswork, but what -they didn't have was gobs of very personal data from which to draw -conclusions about us. Apart from our reading/viewing habits, older forms -of media had comparatively little to work with.</p> -<p class="more"><a href="/posts/2018/10/getting-started-on-mastodon/">Read more…</a></p> -</div> -<h2><a class="subtle-link" href="/posts/2018/10/new-website-backend/">New Website Backend</a></h2> -<div> -<p>For those interested, I've converted this website over from a <a class="reference external" href="https://djangoproject.com">Django</a> -backend to <a class="reference external" href="https://getnikola.com">Nikola</a>. Since there aren't any interactive features on this -site, it's clear that an engine such a Django was overkill and that -Nikola's static generator was a better option. So far, so good. I -especially being able to choose a templating engine (I went with -<a class="reference external" href="http://jinja.pocoo.org">Jinja</a>, since it was most like Django's templating engine).</p> -<p>If you notice anything weird or broken with the site, please hit me up -on one of the social media links on the landing page.</p> -<p>Cheers!</p> -</div> - <nav class="postindexpager"><ul class="pager"> -<li class="next"> - <a href="/index-2.html" rel="next">Older posts</a> - </li> - </ul></nav> -</div> - <div class="sidebar col-xs-12 col-md-4"> - <hr class="visible-xs-block visible-sm-block"> -<div class="h-card"> - <img class="sidebar-image u-photo" src="/assets/avatar.jpg" id="logo" alt="Daniel Moch"><h1 class="visible-xs-block visible-sm-block p-name">Daniel Moch</h1> - <div class="bio sidebar-section p-note"> - -I am a <span class="p-job-title">Software Engineer</span> currently living in -Orlando, Florida. My interests range from technology to entrepreneurship. I -am also interested in writing, movies, and astronomy. I'm also passionate -about seeing people take control of their own data. - - </div> - <div class="social-links sidebar-section"> - <p> - <span class="social-heading">Email</span> - <a class="social-link u-email" rel="me" href="mailto:daniel@danielmoch.com">daniel@danielmoch.com</a> - </p> -<p> - <span class="social-heading">Mastodon</span> - <a class="social-link u-url" rel="me" href="https://mastodon.danielmoch.com/@djmoch">@djmoch@mastodon.danielmoch.com</a> - </p> -<p> - <span class="social-heading">Twitter</span> - <a class="social-link u-url" rel="me" href="https://twitter.com/_djmoch">@_djmoch</a> - </p> -<p> - <span class="social-heading">Github</span> - <a class="social-link u-url" rel="me" href="https://github.com/djmoch">djmoch</a> - </p> -<p> - <span class="social-heading">PGP</span> - <a class="social-link u-url" rel="me" href="/static/gpg.asc">84BDDD43</a> - </p> -<p> - <span class="social-heading">Signify</span> - <a class="social-link u-url" rel="me" href="/static/djmoch-signify.pub">djmoch-signify.pub</a> - - </p> -</div> - </div> - <div class="sidebar-section"> - <h2>Links</h2> - <ul style="before: none;"> -<li><a href="/archive.html">Archive</a></li> - <li><a href="/categories">Categories</a></li> - <li><a href="/rss.xml">RSS</a></li> - </ul> -</div> - <div class="sidebar-section"> - <h2>License Info</h2> - <ul> -<li> - <span>Content: </span> - <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> - </li> - <li> - <span>Code: </span> - <a href="https://git.danielmoch.com/danielmochdotcom/tree/LICENSE.txt">MIT</a> - </li> - <ul></ul> -</ul> -</div> - - </div> - </div> - </div> -</body> -</html> diff --git a/templates/landing_footer.html b/templates/landing_footer.html @@ -0,0 +1,65 @@ +</div> + <div class="sidebar col-xs-12 col-md-4"> + <hr class="visible-xs-block visible-sm-block"> +<div class="h-card"> + <img class="sidebar-image u-photo" src="/assets/avatar.jpg" id="logo" alt="Daniel Moch"><h1 class="visible-xs-block visible-sm-block p-name">Daniel Moch</h1> + <div class="bio sidebar-section p-note"> + +I am a <span class="p-job-title">Software Engineer</span> currently living in +Orlando, Florida. My interests range from technology to entrepreneurship. I +am also interested in writing, movies, and astronomy. I'm also passionate +about seeing people take control of their own data. + + </div> + <div class="social-links sidebar-section"> + <p> + <span class="social-heading">Email</span> + <a class="social-link u-email" rel="me" href="mailto:daniel@danielmoch.com">daniel@danielmoch.com</a> + </p> +<p> + <span class="social-heading">Github</span> + <a class="social-link u-url" rel="me" href="https://github.com/djmoch">djmoch</a> + </p> +<p> + <span class="social-heading">PGP</span> + <a class="social-link u-url" rel="me" href="/static/gpg.asc">84BDDD43</a> + </p> +<p> + <span class="social-heading">Signify</span> + <a class="social-link u-url" rel="me" href="/static/djmoch-signify.pub">djmoch-signify.pub</a> + </p> +<p> + <span class="social-heading">Social Media</span> + <a class="social-link u-url" rel="me" href="https://www.amazon.com/Arguments-Deleting-Social-Media-Accounts/dp/1250239087/ref=sr_1_3?crid=2GNDQK06VHTD0&amp;dchild=1&amp;keywords=10+reasons+to+delete+your+social+media+accounts&amp;qid=1617970743&amp;sprefix=10+reasons%2Caps%2C201&amp;sr=8-3">deleted</a> + + </p> +</div> + </div> + <div class="sidebar-section"> + <h2>Links</h2> + <ul style="before: none;"> +<li><a href="/archive.html">Archive</a></li> + <li><a href="/categories">Categories</a></li> + <li><a href="/rss.xml">RSS</a></li> + </ul> +</div> + <div class="sidebar-section"> + <h2>License Info</h2> + <ul> +<li> + <span>Content: </span> + <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> + </li> + <li> + <span>Code: </span> + <a href="https://git.danielmoch.com/danielmochdotcom/tree/LICENSE.txt">MIT</a> + </li> + <ul></ul> +</ul> +</div> + + </div> + </div> + </div> +</body> +</html> diff --git a/templates/landing_header.html b/templates/landing_header.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html prefix=" + og: http://ogp.me/ns# article: http://ogp.me/ns/article# + " vocab="http://ogp.me/ns" lang="en"> +<head> +<meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> +<meta name="description" content="Daniel Moch's Weblog"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<title>Daniel Moch's Weblog</title> +<link href="/assets/bootstrap.min.css" rel="stylesheet" type="text/css"> +<link href="/assets/css/code.css" rel="stylesheet" type="text/css"> +<link href="/assets/css/site.css" rel="stylesheet" type="text/css"> +<meta name="theme-color" content="#155799"> +<meta name="generator" content="Nikola (getnikola.com)"> +<link rel="alternate" type="application/rss+xml" title="RSS" hreflang="en" href="/rss.xml"> +<link rel="canonical" href="https://www.danielmoch.com/"> +<link rel="icon" href="/favicon.ico" sizes="16x16"> +<link rel="icon" href="/favicon.ico" sizes="32x32"> +<link rel="icon" href="/favicon.ico" sizes="48x48"> +<link rel="icon" href="/favicon.ico" sizes="64x64"> +<link rel="icon" href="/favicon.ico" sizes="256x256"> +<link rel="next" href="/index-3.html" type="text/html"> +<!--[if lt IE 9]><script src="/assets/js/html5shiv-printshiv.min.js"></script><![endif]--><link rel="prefetch" href="/posts/2021/04/giving-the-dumbphone-a-whirl/" type="text/html"> +<meta property="og:site_name" content="Daniel Moch's Weblog"> +<meta property="og:title" content="Daniel Moch's Weblog"> +<meta property="og:type" content="website"> +<meta property="og:image" content="https://www.danielmoch.com/assets/initials-blue.jpg"> +<meta name="twitter:card" content="summary"> +<meta name="twitter:creator" content="@_djmoch"> +</head> +<body> + <header class="banner"><div class="container no-padding"> + <nav class="col-xs-12 banner-subtitle postpromonav" style="display: flex;"><img src="/assets/initials-blue.png" alt="Daniel Moch's Weblog"><ul class="no-margin no-padding tags" style="margin-right: auto;"> +<li class="active"><a href="/">Home<span class="sr-only"> (active)</span></a></li> + <li><a href="/pages/projects">Projects</a></li> + <li><a href="https://git.danielmoch.com">Git</a></li> + + + + + </ul></nav> +</div> + </header><div class="container"> + <div class="row"> + <div class="col-xs-12 col-md-7 content"> +<h1>Daniel Moch's Weblog</h1> diff --git a/templates/footer.html b/templates/post_footer.html diff --git a/templates/post_header.html b/templates/post_header.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article#" vocab="http://ogp.me/ns" lang="en"> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="description" content="DESCRIPTION"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>PAGE_TITLE | Daniel Moch's Weblog</title> + <link href="/assets/bootstrap.min.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/code.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/site.css" rel="stylesheet" type="text/css"> + <meta name="theme-color" content="#155799"> + <meta name="generator" content="dag (git.danielmoch.com/dag)"> + <link rel="alternate" type="application/rss+xml" title="RSS" hreflang="en" href="/rss.xml"> + <link rel="canonical" href="SLUG"> + <link rel="icon" href="/favicon.ico" sizes="16x16"> + <link rel="icon" href="/favicon.ico" sizes="32x32"> + <link rel="icon" href="/favicon.ico" sizes="48x48"> + <link rel="icon" href="/favicon.ico" sizes="64x64"> + <link rel="icon" href="/favicon.ico" sizes="256x256"> + <link rel="next" href="/index-2.html" type="text/html"> + <meta property="og:site_name" content="Daniel Moch's Weblog"> + <meta property="og:title" content="PAGE_TITLE"> + <meta property="og:type" content="article"> + <meta property="og:image" content="https://www.danielmoch.com/assets/initials-blue.jpg"> + <meta name="twitter:card" content="DESCRIPTION"> +</head> +<body> + <header class="banner"> + <div class="container no-padding"> + <nav class="col-xs-12 banner-subtitle postpromonav" style="display: flex;"> + <img src="/assets/initials-blue.png" alt="Daniel Moch's Weblog"> + <ul class="no-margin no-padding tags" style="margin-right: auto;"> + <li class="active"><a href="/">Home<span class="sr-only"> (active)</span></a></li> + <li><a href="/pages/projects">Projects</a></li> + <li><a href="https://git.danielmoch.com">Git</a></li> + </ul> + </nav> + </div> + </header> + <div class="container"> + <div class="row"> + <div class="col-xs-12 col-md-7 content"> + <article class="h-entry"> + <h1 class="page-title p-name">PAGE_TITLE</h1> + <h2 class="page-subtitle"> + <span class="p-summary">DESCRIPTION</span> + </h2>