<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>site on MXI</title><link>https://mxii.eu.org/categories/site/</link><description>Recent content in site on MXI</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 07 Jul 2025 20:45:00 +0400</lastBuildDate><atom:link href="https://mxii.eu.org/categories/site/index.xml" rel="self" type="application/rss+xml"/><item><title>Still alive</title><link>https://mxii.eu.org/2025/07/07/still-alive/</link><pubDate>Mon, 07 Jul 2025 20:45:00 +0400</pubDate><guid>https://mxii.eu.org/2025/07/07/still-alive/</guid><description>&lt;p>Wow, it&amp;rsquo;s been 5 years since the last post.&lt;/p>
&lt;p>I&amp;rsquo;ve got somewhat unusual topic to cover and I don&amp;rsquo;t have another place to put it, so I thought I&amp;rsquo;d try to reanimate this blog. That will be another post. Here is a bit of rambling about the blog revival.&lt;/p></description></item><item><title>JavaScript spoiler with a twist (collapsing up or down)</title><link>https://mxii.eu.org/2017/09/07/javascript-spoiler-with-a-twist-collapsing-up-or-down/</link><pubDate>Thu, 07 Sep 2017 21:28:11 +0300</pubDate><guid>https://mxii.eu.org/2017/09/07/javascript-spoiler-with-a-twist-collapsing-up-or-down/</guid><description>&lt;p>I thought that I will eventually need to use spoilers in this blog to hide long and optional blocks of text. And at the same time I&amp;rsquo;m often unhappy with collapsible block implementations across the Internet.&lt;/p>
&lt;p>So I decided to design my own spoiler with one useful feature: it can be collapsed not only from the top edge but also from the bottom edge &amp;mdash; you will not lose the line you were reading and you don&amp;rsquo;t have to scroll all the way to the beginning of the spoiler.&lt;/p>
&lt;p>Examples:&lt;/p>
&lt;div class="spoiler">
&lt;div class="spoiler-btn spoiler-btn-top">&lt;i class="fa-solid fa-chevron-down">&lt;/i> click to &lt;span class="show">show&lt;/span>&lt;span class="hide">hide&lt;/span>&lt;/div>
&lt;div class="spoiler-body">
&lt;p>This spoiler can be expanded up and down. And your mouse is left right over the button you just pressed whenever it is possible (on top and bottom of a page there may be not enough stuff to keep it so, obviously).&lt;/p>
&lt;p>&lt;img src="https://picsum.photos/410/410?random=1" alt="" />&lt;/p>
&lt;/div>
&lt;div class="spoiler-btn spoiler-btn-bottom">click to &lt;span class="show">show&lt;/span>&lt;span class="hide">hide&lt;/span> &lt;i class="fa-solid fa-chevron-up">&lt;/i>&lt;/div>
&lt;/div>
&lt;div class="spoiler simple">
&lt;div class="spoiler-btn spoiler-btn-top">&lt;i class="fa-solid fa-chevron-down">&lt;/i> click to &lt;span class="show">show&lt;/span>&lt;span class="hide">hide&lt;/span>&lt;/div>
&lt;div class="spoiler-body">
&lt;p>This spoiler can be expanded in one direction only. Collapsing behavior is still the same. The difference is just a few lines in CSS.&lt;/p>
&lt;p>&lt;img src="https://picsum.photos/410/410?random=2" alt="" />&lt;/p>
&lt;/div>
&lt;div class="spoiler-btn spoiler-btn-bottom">click to &lt;span class="show">show&lt;/span>&lt;span class="hide">hide&lt;/span> &lt;i class="fa-solid fa-chevron-up">&lt;/i>&lt;/div>
&lt;/div>
&lt;p>Keep reading to see how it is done.&lt;/p></description></item><item><title>Parallel processing in PowerShell</title><link>https://mxii.eu.org/2016/09/16/parallel-processing-in-powershell/</link><pubDate>Fri, 16 Sep 2016 21:05:05 +0300</pubDate><guid>https://mxii.eu.org/2016/09/16/parallel-processing-in-powershell/</guid><description>&lt;p>Running arbitrary number of tasks in parallel with PowerShell, while showing overall progress.&lt;/p>
&lt;p>The main disadvantage of the code I provided in &lt;a href="https://mxii.eu.org/2016/08/17/blog-minification-in-a-fancy-way-with-powershell/">previous post&lt;/a> is that it is performed sequentially. We can speed it up by means of parallel processing, since main limiting factor is not an I/O but minifying algorithms performance.&lt;/p>
&lt;p>There are a lot of ways to use parallelism in PowerShell and it wasn&amp;rsquo;t clear for me which one suits well for my task. I.e. to convert my script, which is processing a lot of small files on a local machine.&lt;/p>
&lt;p>It also should:&lt;/p>
&lt;ul>
&lt;li>provide updates in real time;&lt;/li>
&lt;li>keep output table formatting as close to original as possible.&lt;/li>
&lt;/ul></description></item><item><title>Blog minification in a fancy way with PowerShell</title><link>https://mxii.eu.org/2016/08/17/blog-minification-in-a-fancy-way-with-powershell/</link><pubDate>Wed, 17 Aug 2016 00:31:11 +0300</pubDate><guid>https://mxii.eu.org/2016/08/17/blog-minification-in-a-fancy-way-with-powershell/</guid><description>&lt;p>There is no built-in support for minification in Hugo engine, which isn&amp;rsquo;t a bad thing on its own. But I had to figure out a way to minify my files while keeping building and maintenance extremely simple.&lt;/p>
&lt;p>At first point I added &lt;a href="https://github.com/tdewolff/minify/tree/master/cmd/minify">minify&lt;/a> for text files. It&amp;rsquo;s a single binary (written in Go), and with a single call it can run recursively over Hugo&amp;rsquo;s public folder, minifying output files in-place, just as I needed.&lt;/p>
&lt;p>But minifying images is a more tricky task. I decided to use &lt;a href="http://jpegclub.org/jpegtran/">jpegtran&lt;/a> and &lt;a href="http://optipng.sourceforge.net/">optipng&lt;/a>, but they can&amp;rsquo;t be run recursively. Some scripting is required to use them. While the task of finding all the images in a folder and applying minifiers on them is trivial and can be solved with PowerShell one-liner, it was not satisfying enough, so I end up with the thing described below in this post.&lt;/p>
&lt;p>Additional motivation is to have a tool that can be adopted easily to any other processing task and will give me a fancy progress report.&lt;/p></description></item><item><title>Hugo site</title><link>https://mxii.eu.org/project/hugo-site/</link><pubDate>Sat, 20 Feb 2016 14:54:30 +0300</pubDate><guid>https://mxii.eu.org/project/hugo-site/</guid><description>&lt;p>This site created with Hugo static website framework.&lt;/p>
&lt;p>Project page will be a collection of non-obvious and frustrating things I found while making it.&lt;/p></description></item><item><title>Decision between various blog engines</title><link>https://mxii.eu.org/2016/02/20/decision-between-various-blog-engines/</link><pubDate>Sat, 20 Feb 2016 14:54:00 +0300</pubDate><guid>https://mxii.eu.org/2016/02/20/decision-between-various-blog-engines/</guid><description>&lt;p>Ok, now this site is officially live. Time to write something. I&amp;rsquo;ll start from some details about site itself.&lt;/p>
&lt;p>Initial idea was (long time ago) to use &lt;a href="http://www.pmwiki.org/">PmWiki&lt;/a> as the site engine. I&amp;rsquo;ve used it before and I really like it. The main drawback that was bothering me - the complexity of maintaining blog-like site on a wiki engine. It is possible, but there are better ways to do it.&lt;/p>
&lt;p>Then I discovered static site generators. There is not much conceptual difference between them and file-based wiki engines like PmWiki - bunch of text files translated into html pages with some rules, but on publishing time, rather than each time on site access. And it&amp;rsquo;s perfectly fine this kind of site. There even should be a way to use PmWiki as static site generator, if I remember correctly.&lt;/p>
&lt;p>Looking for static site frameworks, I quickly discovered that there is a plenty of them. And there is a good choice of programming languages they are implemented in. As it was with PmWiki some time ago, I need to compare them and decide on optimal choice.&lt;/p></description></item><item><title>Hello world</title><link>https://mxii.eu.org/2015/11/02/hello-world/</link><pubDate>Mon, 02 Nov 2015 22:18:46 +0300</pubDate><guid>https://mxii.eu.org/2015/11/02/hello-world/</guid><description>This is just a placeholder post.
Posts will start appearing here later. You can subscribe to RSS if you don&amp;rsquo;t want to miss that moment.</description></item></channel></rss>