<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on</title><link>http://salopst.yearl.us/categories/blog/</link><description>Recent content in Blog on</description><generator>Hugo</generator><language>en</language><copyright>&lt;a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener"&gt;CC BY-NC 4.0&lt;/a&gt;</copyright><lastBuildDate>Sun, 17 Apr 2022 16:13:51 +0100</lastBuildDate><atom:link href="http://salopst.yearl.us/categories/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Updating Hugo from source</title><link>http://salopst.yearl.us/updating-hugo-from-source/</link><pubDate>Fri, 11 Feb 2022 08:18:29 +0000</pubDate><guid>http://salopst.yearl.us/updating-hugo-from-source/</guid><description>&lt;h1 id="updating-hugo-from-source-089-devextended-to-github-latest"&gt;Updating Hugo from source (0.89-DEV+Extended to Github latest)&lt;/h1&gt;&#10;&lt;p&gt;Well this was a wee bit of a pain. The previous two installs from Github were a simple&lt;/p&gt;&#10;&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd src&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git clone https://github.com/gohugoio/hugo.git&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd hugo &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; go install --tags extended&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And 🔥Boom🔥! The Hugo binary was installed to &lt;code&gt;/usr/local/bin&lt;/code&gt;&lt;/p&gt;&#10;&lt;p&gt;So naturally a&lt;/p&gt;&#10;&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd src/hugo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git fetch&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd hugo &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; go install --tags extended&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;should work. But no cigar this time. Instead (and this is the long work around so as not to confuse subsequent senile self)&amp;hellip;&lt;/p&gt;</description></item><item><title>Image file locations in Hugo</title><link>http://salopst.yearl.us/image-flie-locations-in-hugo-static-site-generator/</link><pubDate>Mon, 27 Sep 2021 14:50:23 +0100</pubDate><guid>http://salopst.yearl.us/image-flie-locations-in-hugo-static-site-generator/</guid><description>&lt;p&gt;The images referenced from from the posts here currently live in three locations, based at Hugo&amp;rsquo;s root, ie. relative to &lt;code&gt;config.toml&lt;/code&gt;:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;├── archetypes&#10;├── config.toml&#10;├── static&#10;| └── wp-uploads&#10;| ├── whatever-historic-filename.png&#10;| ├── 2000-01-01-kinda-like-the-alt-text.png&#10;├── content&#10;| └── img&#10;| ├── uploads&#10;| | ├── 2000-01-01-kinda-like-the-alt-text.png&#10;| └── post&#10;| ├── 2000-01-01-the-filename-is-the-slug-kinda.md&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;```/static/wp-uploads&lt;code&gt; &lt;/code&gt;/content/img/uploads/1&lt;/p&gt;&#10;&lt;h2 id="i-put-images-inside-a-folder-called-images-under-contentpost-this-is-the-file-structure-for-the-hugo-project"&gt;I put images inside a folder called images under content/post/. This is the file structure for the Hugo project:&lt;/h2&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;├── archetypes&#10;├── config.toml&#10;├── content&#10;| └── post&#10;| ├── your-post.md&#10;| ├── images&#10;| | ├── your-image.png&#10;&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="everything-you-put-on-static-folder-will-be-served-at-the-root-of-your-webiste-ex"&gt;Everything you put on static folder will be served at the root of your webiste, ex:&lt;/h2&gt;&#10;&lt;p&gt;/static&#10;/cover.jpg&#10;/img/&#10;/cover2.jpg&#10;/foo&#10;/cover3.png&lt;/p&gt;</description></item><item><title>Fixing a generic github pages build error</title><link>http://salopst.yearl.us/fixing-a-generic-github-pages-jekyll-build-error/</link><pubDate>Sat, 18 Sep 2021 06:24:19 +0100</pubDate><guid>http://salopst.yearl.us/fixing-a-generic-github-pages-jekyll-build-error/</guid><description>&lt;p&gt;For the last little while I&amp;rsquo;ve been getting generic messages from github about jekyll build failures. I&amp;rsquo;ve been ignoring these because I don&amp;rsquo;t much care about jekyll, and things seem to be working well enough with the files as they are hoovered by by Netlify, and build largely without iss to produce this site.&lt;/p&gt;&#10;&lt;p&gt;I might have tried to fix this sooner, but the messages are pretty generic. How generic? &lt;em&gt;This generic&lt;/em&gt;:&lt;/p&gt;</description></item><item><title>Website Analytics Hugo and Goatcounter: Ditching Google</title><link>http://salopst.yearl.us/website-analytics-hugo-shortcodes-and-goatcounter/</link><pubDate>Sat, 18 Sep 2021 05:43:09 +0100</pubDate><guid>http://salopst.yearl.us/website-analytics-hugo-shortcodes-and-goatcounter/</guid><description>&lt;h2 id="goatcounter"&gt;Goatcounter&lt;/h2&gt;&#10;&lt;p&gt;So, the Googles are everywhere. Their website analytics have been free to use for some time&amp;ndash; almost as long as I can remember&amp;ndash; and they are, frankly pretty amazing. But surely, surely there is something that grates less on the conscience?&lt;/p&gt;&#10;&lt;p&gt;Why yes! &lt;a href="https://goatcounter.com"&gt;Goatcounter&lt;/a&gt; is Free, Libre Open-Source Software (you do FLOSS, right?) that attempts pretty much the same kind of analytics. It&amp;rsquo;s a lightweight, privacy-conscious website analytics platform, free of cookies and all that intrusive jazz.&lt;/p&gt;</description></item><item><title>Fixing git oopsies</title><link>http://salopst.yearl.us/fixing-git-oopsies/</link><pubDate>Wed, 08 Sep 2021 10:43:08 +0100</pubDate><guid>http://salopst.yearl.us/fixing-git-oopsies/</guid><description>&lt;p&gt;I made an oopsies in &lt;code&gt;netlify.toml&lt;/code&gt; that caused the build to fail, so review the commit history with &lt;code&gt;git log&lt;/code&gt;:&lt;/p&gt;&#10;&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;❯❯ git log | rg netlify&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1481e97 Wed Sep &lt;span style="color:#ae81ff"&gt;8&lt;/span&gt; 10:05:12 &lt;span style="color:#ae81ff"&gt;2021&lt;/span&gt; +0100 C T Added caching plugin; specified Hugo 0.80.0 to allow &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; easier tracking of errors and changes on netlify vs localhost; added content type headers&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cb5842e Fri Aug &lt;span style="color:#ae81ff"&gt;27&lt;/span&gt; 16:56:36 &lt;span style="color:#ae81ff"&gt;2021&lt;/span&gt; +0100 C T reset netlify base to root&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;188065b Fri Aug &lt;span style="color:#ae81ff"&gt;27&lt;/span&gt; 16:20:53 &lt;span style="color:#ae81ff"&gt;2021&lt;/span&gt; +0100 C T First netlify.toml&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And reset local head with&lt;/p&gt;</description></item><item><title>Diagrams and Maths in Hugo</title><link>http://salopst.yearl.us/drawing-diagrams-and-making-math-in-hugo/</link><pubDate>Tue, 07 Sep 2021 20:13:00 +0100</pubDate><guid>http://salopst.yearl.us/drawing-diagrams-and-making-math-in-hugo/</guid><description>&lt;h2 id="can-we-handle-flowcharts-using-flowchartjs-"&gt;Can we handle flowcharts using &lt;code&gt;flowchart.js&lt;/code&gt; ?&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="http://flowchart.js.org/"&gt;flowchart.js&lt;/a&gt;?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Given a code-block of&lt;/p&gt;&#10;&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-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;```flow&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q0=&amp;gt;condition: Does it move?&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q1=&amp;gt;condition: Should it?&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q2=&amp;gt;condition: Should it?&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;np=&amp;gt;end: No problem!&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dt=&amp;gt;end: Duct Tape! No Problem&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wd=&amp;gt;end: Wd40 Rien de problem!&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q0(yes)-&amp;gt;q1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q0(no)-&amp;gt;q2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q1(yes)-&amp;gt;np&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q1(no)-&amp;gt;dt&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q2(yes)-&amp;gt;wd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;q2(no)-&amp;gt;np&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre tabindex="0"&gt;&lt;code&gt;&#10;```flow&#10;q0=&amp;gt;condition: Does it move?&#10;q1=&amp;gt;condition: Should it?&#10;q2=&amp;gt;condition: Should it?&#10;&#10;np=&amp;gt;end: No problem!&#10;dt=&amp;gt;end: Duct Tape! No Problem&#10;wd=&amp;gt;end: Wd40 Rien de problem!&#10;&#10;q0(yes)-&amp;gt;q1&#10;q0(no)-&amp;gt;q2&#10;&#10;q1(yes)-&amp;gt;np&#10;q1(no)-&amp;gt;dt&#10;&#10;q2(yes)-&amp;gt;wd&#10;q2(no)-&amp;gt;np&#10;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="this-is-a-mermaid-example"&gt;This is a mermaid example:&lt;/h2&gt;&#10;&lt;p&gt;With the shortcode&lt;/p&gt;</description></item><item><title>Gāyatrī Mantra (Sāvitri Mantra)</title><link>http://salopst.yearl.us/gayatri-mantra/</link><pubDate>Wed, 30 Jun 2021 13:06:15 +0100</pubDate><guid>http://salopst.yearl.us/gayatri-mantra/</guid><description>The Gāyatrī Mantra, also known as the Sāvitri Mantra, is a highly revered mantra from the Rig Veda (Mandala 3.62.10),[1] dedicated to the Vedic deity Savitr</description></item><item><title>Historical UK inflation rates and calculator</title><link>http://salopst.yearl.us/uk-historical-inflation-rates-and-calculator/</link><pubDate>Mon, 18 May 2020 14:33:57 +0100</pubDate><guid>http://salopst.yearl.us/uk-historical-inflation-rates-and-calculator/</guid><description>&lt;p&gt;Since I&amp;rsquo;m getting all old and remember days and prices from long ago, when big hair and awesome music was all the rage, and you had to have a licence to keep a dog, Imma constantly searching for roughly equivalent prices over the years.&lt;/p&gt;&#10;&lt;p&gt;This then is lifted squarely (and fairly) from &lt;a href="https://inflation.iamkate.com/"&gt;https://inflation.iamkate.com/&lt;/a&gt;, for which, 🙏 thanks!&lt;/p&gt;&#10;&lt;h2 id="historical-prices-can-be-converted-into-equivalent-present-day-prices-by-using-historical-inflation-rates"&gt;Historical prices can be converted into equivalent present-day prices by using historical inflation rates.&lt;/h2&gt;&#10;&lt;iframe src="https://inflation.iamkate.com/calculator/"&#10; width="264" height="205"&#10; sandbox="allow-scripts allow-top-navigation"&gt;&lt;/iframe&gt;&#10;&lt;h2 id="inflation-rate-history"&gt;Inflation rate history&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Data for 1949 onwards comes from the Office for National Statistics document &lt;a href="https://www.ons.gov.uk/economy/inflationandpriceindices/timeseries/czbh/mm23%22"&gt;https://www.ons.gov.uk/economy/inflationandpriceindices/timeseries/czbh/mm23&amp;quot;&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Data for 1751 to 1948 comes from the 2004 paper &lt;em&gt;Consumer Price Inflation Since 1750&lt;/em&gt; (ISSN: 0013-0400) &lt;strong&gt;Economic Trends No. 604&lt;/strong&gt;, pp 38-46) by Jim O’Donoghue, Louise Goulding, and Grahame Allen.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Scratch notes on Hugo (and this implementation)</title><link>http://salopst.yearl.us/scratch-notes-on-hugo/</link><pubDate>Mon, 18 May 2020 14:33:57 +0100</pubDate><guid>http://salopst.yearl.us/scratch-notes-on-hugo/</guid><description>&lt;img src="http://salopst.yearl.us/img/uploads/leaping-baby-brown-trout.jpg" alt="Brown trout are the best trout" class="center" style="border-radius: 50px;" /&gt;&#10;&#10;&#10;&lt;h3 id="-this-image-above-is-not-in-the-general-template-for-a-post-file-it-is-added-with"&gt;^^^ This image above is not in the general template for a post file. It is added with:&lt;/h3&gt;&#10;&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-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{{&amp;lt; image src=&amp;#34;/img/uploads/leaping-baby-brown-trout.jpg&amp;#34; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; alt=&amp;#34;Hello Friendo&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; position=&amp;#34;center&amp;#34; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; style=&amp;#34;border-radius: 50px;&amp;#34; &amp;gt;}}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Escaping&lt;/strong&gt; the shortcode such that it would not be executed was non-obvious. It is done with &lt;code&gt;/*&lt;/code&gt; and &lt;code&gt;*/&lt;/code&gt; &lt;em&gt;immediately inside&lt;/em&gt; the shortcode&amp;rsquo;s &lt;code&gt;{{&lt;/code&gt; and &lt;code&gt;}}&lt;/code&gt;&amp;hellip; hpwever you slice it, that can haardly be considered concise.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Hugo&amp;rsquo;s default markdown flavour was blackfriday: &lt;a href="https://github.com/russross/blackfriday"&gt;https://github.com/russross/blackfriday&lt;/a&gt; until Hugo version v0.60.0 adopted goldmark: &lt;a href="https://libs.garden/go/yuin/goldmark"&gt;https://libs.garden/go/yuin/goldmark&lt;/a&gt;. So, to deal with raw inline HTML in your Markdown files we need to enable the unsafe mode in &lt;code&gt;config.toml&lt;/code&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>About this site</title><link>http://salopst.yearl.us/about/</link><pubDate>Sat, 09 Apr 2011 00:00:00 +0000</pubDate><guid>http://salopst.yearl.us/about/</guid><description>&lt;p&gt;The current incarnation of whatever dross this is is implemented by &lt;a href="https://gohugo.io"&gt;Hugo&lt;/a&gt;, allegedly the &lt;strong&gt;world’s fastest framework for building websites&lt;/strong&gt;. It is written in Go.&lt;/p&gt;&#10;&lt;p&gt;There are many websites like it, but this one is mine. At one point it was hosted on Tumbler (I think), then Blogger, and more recently Wordpress, but a snafu with the hosting provider&amp;ndash; to whom I had foolishly entrusted my Nextclouds&amp;ndash; led me to think about an alternative. Why, I don&amp;rsquo;t rightly know since there&amp;rsquo;s nothing much here anyway. And what is here is mostly odd and old notes of various things that may not all render consistently given their history.&lt;/p&gt;</description></item><item><title>Installing Hugo with SASS support on Linux</title><link>http://salopst.yearl.us/install-hugo-extended-from-source-on-ubuntu/</link><pubDate>Thu, 07 Oct 2021 21:31:37 +0100</pubDate><guid>http://salopst.yearl.us/install-hugo-extended-from-source-on-ubuntu/</guid><description>&lt;p&gt;Out of the box, Hugo does not come with support for compiling SASS/SCSS to CSS. This has led to a number of errors highlighted by Chrome&amp;rsquo;s Inspector after my having had modified the SCSS files that came with the thems I am using. So we need to compile these extensions in.&lt;/p&gt;&#10;&lt;p&gt;The following command did the trick on Pop!_OS (Ubuntu 21.04), and gives me the latest version of Hugo (0.89) to boot.&lt;/p&gt;</description></item><item><title>Eek! CodeColorer Wordpress plugin and PHP 7.1</title><link>http://salopst.yearl.us/eek-codecolorer-wordpress-plugin-and-php-7-1/</link><pubDate>Wed, 01 Mar 2017 14:33:33 +0000</pubDate><guid>http://salopst.yearl.us/eek-codecolorer-wordpress-plugin-and-php-7-1/</guid><description>&lt;p&gt;Having used the most excellent &lt;a href="http://he.net/"&gt;Hurricane Electric&lt;/a&gt; for the longest time I decided to relocate. In so doing I realised that I was moving from a PHP 5.2 to a PHP 7.1 environment. Gulp! Has it been that long. Expecting lots o&amp;rsquo; issues, but amazingly no. Just the tiniest of tiny issues:&lt;/p&gt;&#10;&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-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PHP Warning: preg_replace&lt;span style="color:#f92672"&gt;()&lt;/span&gt;: The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/wp-content/plugins/codecolorer/codecolorer-core.php on line &lt;span style="color:#ae81ff"&gt;50&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="so-comment-out"&gt;So, comment out:&lt;/h3&gt;&#10;&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-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;BeforeHighlightCodeBlock&lt;/span&gt;($content) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\[cc([^\s\]_]*(?:_[^\s\]]*)?)([^\]]*)\](.*?)\[/cc\2\](\s*)#sie&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;$this-&amp;gt;PerformHighlightCodeBlock(\&amp;#39;\\4\&amp;#39;, \&amp;#39;\\3\&amp;#39;, $content, \&amp;#39;\\2\&amp;#39;, \&amp;#39;\\1\&amp;#39;, \&amp;#39;\\5\&amp;#39;);&amp;#39;&lt;/span&gt;, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\(.*?)\(\s*)#sie&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;$this-&amp;gt;PerformHighlightCodeBlock(\&amp;#39;\\3\&amp;#39;, \&amp;#39;\\2\&amp;#39;, $content, \&amp;#39;\&amp;#39;, \&amp;#39;\\1\&amp;#39;, \&amp;#39;\\4\&amp;#39;);&amp;#39;&lt;/span&gt;, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $content;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="adding"&gt;adding&lt;/h3&gt;&#10;&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-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;BeforeHighlightCodeBlock&lt;/span&gt;($content) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace_callback&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\[cc([^\s\]_]*(?:_[^\s\]]*)?)([^\]]*)\](.*?)\[/cc\2\](\s*)#si&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt;($matches){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $this&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;PerformHighlightCodeBlock&lt;/span&gt;($matches[&lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;]);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace_callback&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\(.*?)\(\s*)#si&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt;($matches){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $this&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;PerformHighlightCodeBlock&lt;/span&gt;($matches[&lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;], &lt;span style="color:#e6db74"&gt;&amp;#39;&amp;#39;&lt;/span&gt;, $matches[&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;]);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $content;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;php&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Posting from IA Writer to Wordpress (Coleman)</title><link>http://salopst.yearl.us/blog-post-ia-writer-to-wordpress-with-ruby/</link><pubDate>Sun, 24 Apr 2016 00:01:57 +0000</pubDate><guid>http://salopst.yearl.us/blog-post-ia-writer-to-wordpress-with-ruby/</guid><description>&lt;h2 id="0-wha"&gt;0. Wha?&lt;/h2&gt;&#10;&lt;p&gt;With the coming of the new &lt;a href="http://stephen.yearl.us/rescue-doggie-diary/"&gt;doggie into the house&lt;/a&gt;, perhaps I will again add more content to the &lt;a href="http://stephen.yearl.us"&gt;bloggy thing&lt;/a&gt; that I have kinda sorta not really been keeping over the last little while.&lt;/p&gt;&#10;&lt;p&gt;Probably this has been done by someone else on the Intertubz, but ach, why not. I have some time on my hands, so here are running notes in &lt;a href="https://ia.net/writer"&gt;IA Writer&lt;/a&gt; that will make its way to a &lt;a href="https://www.wordpress.com"&gt;Wordpress&lt;/a&gt; post by some means or other. There’s nothing special about IA writer, by the way. Well, there &lt;strong&gt;is&lt;/strong&gt;, but not for the purposes of the Wordpress posting. The same code should work with any plain-ish text file coming from any editor.&lt;/p&gt;</description></item><item><title>Online LaTeX editing tools</title><link>http://salopst.yearl.us/online-latex-editing-tools/</link><pubDate>Sun, 17 Feb 2013 13:12:07 +0000</pubDate><guid>http://salopst.yearl.us/online-latex-editing-tools/</guid><description>&lt;p&gt;For whatever reason, I&amp;rsquo;ve bumped into a number of in-browser &lt;code&gt;\LaTeX&lt;/code&gt; editing tools recently. I guess these are mostly useful for collaborative efforts, and I can see a reason why one would not want to use Subversion or Git. I mean Eldest is just coming of an age where he&amp;rsquo;s seeing computers as tools for his own use rather than just vectors of games/educational materials/movies. Because I am a benevolent father-dictator, he&amp;rsquo;s already familiar with &lt;code&gt;\LaTeX&lt;/code&gt; (and actually loves Computer Modern), and has decided to set all his writings in &lt;code&gt;\LaTeX&lt;/code&gt; prior to submission. Good for him. I love the fact that he was complaining about fonts on the MacBook Airs at school, and the pain of writing in MS Word. Good boy!&lt;/p&gt;</description></item></channel></rss>