<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Commonplace Book</title><link>/tags/computing/</link><description>Recent content on Commonplace Book</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Fri, 06 Jun 2025 15:15:00 +0000</lastBuildDate><atom:link href="/tags/computing/index.xml" rel="self" type="application/rss+xml"/><item><title>Pandoc from Markdown to HTML</title><link>/posts/1c2-pandoc-markdown-to-html/</link><pubDate>Fri, 06 Jun 2025 15:15:00 +0000</pubDate><guid>/posts/1c2-pandoc-markdown-to-html/</guid><description>&lt;p&gt;&lt;a href="../../posts/1c-pandoc/"&gt;Pandoc&lt;/a&gt; can convert from &lt;a href="../../posts/1a-markdown/"&gt;Markdown&lt;/a&gt; to HTML with a single command.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pandoc -s -o output.html input.md
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><content:encoded><![CDATA[<p><a href="/posts/1c-pandoc/">Pandoc</a> can convert from <a href="/posts/1a-markdown/">Markdown</a> to HTML with a single command.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span>pandoc -s -o output.html input.md
</span></span></code></pre></div>]]></content:encoded></item><item><title>Hugo Backlinks</title><link>/posts/1b1-hugo-backlinks/</link><pubDate>Fri, 30 May 2025 18:45:00 +0000</pubDate><guid>/posts/1b1-hugo-backlinks/</guid><description>&lt;p&gt;Backlinks can be added to Hugo using templates and shortcodes. &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://aaron.com.es/blog/add-backlinks-to-hugo/"&gt;Guide for Backlinks in Hugo&lt;/a&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><content:encoded><![CDATA[<p>Backlinks can be added to Hugo using templates and shortcodes. <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://aaron.com.es/blog/add-backlinks-to-hugo/">Guide for Backlinks in Hugo</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>Date Time Shortcut</title><link>/posts/1d1a-datetime-shortcut/</link><pubDate>Fri, 30 May 2025 17:54:00 +0000</pubDate><guid>/posts/1d1a-datetime-shortcut/</guid><description>&lt;p&gt;When writing Markdown in VS Code it&amp;rsquo;s useful to be able to insert the current date and time quickly. You can do this by setting up a keyboard shortcut&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; that inserts the current date and time in a specific format.&lt;/p&gt;
&lt;p&gt;To set up a date time shortcut in VS Code, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the command palette by pressing &lt;code&gt;Ctrl+Shift+P&lt;/code&gt; (or &lt;code&gt;Cmd+Shift+P&lt;/code&gt; on macOS).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Type &amp;ldquo;Preferences: Open Keyboard Shortcuts (JSON)&amp;rdquo; and select it.&lt;/p&gt;</description><content:encoded><![CDATA[<p>When writing Markdown in VS Code it&rsquo;s useful to be able to insert the current date and time quickly. You can do this by setting up a keyboard shortcut<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> that inserts the current date and time in a specific format.</p>
<p>To set up a date time shortcut in VS Code, follow these steps:</p>
<ol>
<li>
<p>Open the command palette by pressing <code>Ctrl+Shift+P</code> (or <code>Cmd+Shift+P</code> on macOS).</p>
</li>
<li>
<p>Type &ldquo;Preferences: Open Keyboard Shortcuts (JSON)&rdquo; and select it.</p>
</li>
<li>
<p>Add the following JSON snippet to your <code>keybindings.json</code> file</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#960050;background-color:#1e0010">},</span>
</span></span><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&#34;key&#34;</span>: <span style="color:#e6db74">&#34;ctrl+d t&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&#34;command&#34;</span>: <span style="color:#e6db74">&#34;editor.action.insertSnippet&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&#34;when&#34;</span>: <span style="color:#e6db74">&#34;editorTextFocus&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&#34;args&#34;</span>: {
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&#34;snippet&#34;</span>: <span style="color:#e6db74">&#34;$CURRENT_YEAR-$CURRENT_MONTH-${CURRENT_DATE}T$CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND.000&#34;</span>
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div></li>
<li>
<p>Save the file.</p>
</li>
<li>
<p>Now, whenever you press <code>Ctrl+d t</code> (or your chosen key combination), it will insert the current date and time in the format <code>YYYY-MM-DDTHH:MM:SS.000</code>.</p>
</li>
</ol>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://mattferderer.com/create-a-snippet-or-shortcut-in-vs-code-to-insert-the-current-date-time">https://mattferderer.com/create-a-snippet-or-shortcut-in-vs-code-to-insert-the-current-date-time</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>VS Code Keyboard Shortcuts</title><link>/posts/1d1-keyboardshortcuts/</link><pubDate>Fri, 30 May 2025 17:52:00 +0000</pubDate><guid>/posts/1d1-keyboardshortcuts/</guid><description>&lt;p&gt;&lt;a href="6-vscode.md"&gt;VS Code&lt;/a&gt; stores its keyboard shortcuts in a JSON file. You can access this file by going to the command palette ([Ctrl|Cmd]+Shift+P) and typing &amp;ldquo;Open Keyboard Shortcuts (JSON)&amp;rdquo;.&lt;/p&gt;</description><content:encoded><![CDATA[<p><a href="6-vscode.md">VS Code</a> stores its keyboard shortcuts in a JSON file. You can access this file by going to the command palette ([Ctrl|Cmd]+Shift+P) and typing &ldquo;Open Keyboard Shortcuts (JSON)&rdquo;.</p>
]]></content:encoded></item><item><title>VS Code</title><link>/posts/1d-vscode/</link><pubDate>Fri, 30 May 2025 17:51:00 +0000</pubDate><guid>/posts/1d-vscode/</guid><description>&lt;p&gt;Visual Studio Code (VS Code)&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; is a free, open-source code editor developed by Microsoft. It is available for Windows, macOS, and Linux. VS Code is designed for building and debugging modern web and cloud applications. It includes support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://code.visualstudio.com/"&gt;VS Code&lt;/a&gt;.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><content:encoded><![CDATA[<p>Visual Studio Code (VS Code)<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> is a free, open-source code editor developed by Microsoft. It is available for Windows, macOS, and Linux. VS Code is designed for building and debugging modern web and cloud applications. It includes support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://code.visualstudio.com/">VS Code</a>.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>Hugo (Go) Static Site Generator</title><link>/posts/1b-hugo/</link><pubDate>Wed, 29 Jan 2025 03:36:00 +0000</pubDate><guid>/posts/1b-hugo/</guid><description>&lt;p&gt;Hugo&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; is a popular open-source static site generator written in Go. Known for its speed and flexibility. It specialises in generating static content making it a great choice for building content driven websites and blogs. In hugo pages are written in &lt;a href="../../posts/1a-markdown/"&gt;Markdown&lt;/a&gt;.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://gohugo.io/"&gt;Hugo Site&lt;/a&gt;.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><content:encoded><![CDATA[<p>Hugo<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> is a popular open-source static site generator written in Go. Known for its speed and flexibility. It specialises in generating static content making it a great choice for building content driven websites and blogs. In hugo pages are written in <a href="/posts/1a-markdown/">Markdown</a>.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://gohugo.io/">Hugo Site</a>.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>Markdown</title><link>/posts/1a-markdown/</link><pubDate>Wed, 29 Jan 2025 03:36:00 +0000</pubDate><guid>/posts/1a-markdown/</guid><description>&lt;p&gt;Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats, but the original tool by the same name only supports HTML.&lt;/p&gt;</description><content:encoded>&lt;p>Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats, but the original tool by the same name only supports HTML.&lt;/p>
</content:encoded></item><item><title>Markdown Footnote ids</title><link>/posts/1a1a-footnote-ids/</link><pubDate>Wed, 29 Jan 2025 03:36:00 +0000</pubDate><guid>/posts/1a1a-footnote-ids/</guid><description>&lt;p&gt;Since large documents can have many footnotes it can be difficult to keep track of which ids have been used. To make it easier to come up with unique ids for every footnote in a single large document, I use a date and time format. For example, the footnote id &lt;code&gt;[^202505291403]&lt;/code&gt; corresponds to May 29, 2025 at 14:03. It&amp;rsquo;s unlikely I&amp;rsquo;ll reference two things in the space of a minute, this ensures that each footnote id is unique and easy to reference.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Since large documents can have many footnotes it can be difficult to keep track of which ids have been used. To make it easier to come up with unique ids for every footnote in a single large document, I use a date and time format. For example, the footnote id <code>[^202505291403]</code> corresponds to May 29, 2025 at 14:03. It&rsquo;s unlikely I&rsquo;ll reference two things in the space of a minute, this ensures that each footnote id is unique and easy to reference.</p>
]]></content:encoded></item><item><title>Markdown Footnotes</title><link>/posts/1a1-markdown-footnotes/</link><pubDate>Wed, 29 Jan 2025 03:36:00 +0000</pubDate><guid>/posts/1a1-markdown-footnotes/</guid><description>&lt;p&gt;Footnotes in &lt;a href="1-markdown"&gt;markdown&lt;/a&gt; are created using the following syntax:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;This is a sentence with a footnote.[^1]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[^1]: This is the footnote text.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The footnote is referenced by the caret symbol &lt;code&gt;^&lt;/code&gt; followed by a number or identifier. The identifier can be anything, so long as it is unique within the document. The footnote text is defined at the end of the document, using the same identifier.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/52078829/automatic-number-of-footnotes"&gt;StackOverflow: Automatic number of footnotes?&lt;/a&gt;, Referenced on 2025-05-29.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;</description><content:encoded><![CDATA[<p>Footnotes in <a href="1-markdown">markdown</a> are created using the following syntax:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-markdown" data-lang="markdown"><span style="display:flex;"><span>This is a sentence with a footnote.[^1]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>[^1]: This is the footnote text.
</span></span></code></pre></div><p>The footnote is referenced by the caret symbol <code>^</code> followed by a number or identifier. The identifier can be anything, so long as it is unique within the document. The footnote text is defined at the end of the document, using the same identifier.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://stackoverflow.com/questions/52078829/automatic-number-of-footnotes">StackOverflow: Automatic number of footnotes?</a>, Referenced on 2025-05-29.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>Pandoc</title><link>/posts/1c-pandoc/</link><pubDate>Wed, 29 Jan 2025 03:36:00 +0000</pubDate><guid>/posts/1c-pandoc/</guid><description>&lt;p&gt;Pandoc is a command line tool for converting document formats.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; It supports converting to and from a huge range of formats.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://pandoc.org/"&gt;Pandoc Docs&lt;/a&gt;.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description><content:encoded><![CDATA[<p>Pandoc is a command line tool for converting document formats.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> It supports converting to and from a huge range of formats.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://pandoc.org/">Pandoc Docs</a>.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>Pandoc Numbering Sections</title><link>/posts/1c1-numbering-sections/</link><pubDate>Wed, 29 Jan 2025 03:36:00 +0000</pubDate><guid>/posts/1c1-numbering-sections/</guid><description>&lt;p&gt;When exporting from markdown to HTML you may want to switch from using H1s to H2s for the content since HTML should not include more than a single H1. To achieve this you can pass the option &lt;code&gt;--shift-headaing-level-by=1&lt;/code&gt; to &lt;a href="../../posts/1c-pandoc/"&gt;Pandoc&lt;/a&gt;. This will shift all headings down by one level, making H2s into H3s, H3s into H4s, and so on.&lt;/p&gt;</description><content:encoded><![CDATA[<p>When exporting from markdown to HTML you may want to switch from using H1s to H2s for the content since HTML should not include more than a single H1. To achieve this you can pass the option <code>--shift-headaing-level-by=1</code> to <a href="/posts/1c-pandoc/">Pandoc</a>. This will shift all headings down by one level, making H2s into H3s, H3s into H4s, and so on.</p>
]]></content:encoded></item></channel></rss>