Гараар ганц хүнийг дийлэх. Tолгойгоор мянган хүнийг дийлэх.
Conquer one with your hands, a thousand with your head.
— Mongolian proverb
This is a website about computer science and engineering (including a collection of code snippets) and information about various other topics that people might find interesting or useful. Content is published infrequently, articles are updated when it makes sense. Parts may be rewritten at any time and without further notice.
Served as static pages without backend scripting or databases.
If you copy code and lose data or money, if you arrive late to work because of an unexpected corner case, if you mindlessly copy code onto your nuclear submarine and accidently blow up half of your coast, or in any other case: I take no responsibility for any side effects this site’s content causes. Make sure you understand what you are doing.
You can find the project page of turandot (a minimalistic PostgreSQL business-intelligence server) here.
The site’s content is assigned to multiple categories. These are:
- Computer Science & Software Engineering
- (Applied) Systems
At the moment there are no category listings, but you can find a chronological collection of all articles in the archives.
A list of the 5 latest articles. If you want to see more, visit the archives page shown above.
Group Hakyll posts by year (for chronological archives)
This article shows how to create a listing of all Hakyll 4 posts (from now on referred to as articles) grouped by year in reverse chronological order.
Beautify Hakyll post URLs: Removing .html extension and timestamp
Standard Hakyll post URLs end in
.htmland the file name starts with a timestamp. Furthermore, all posts (we’ll call them articles) are saved inside a common directory that we don’t want to show in our URLs because we are using category directories anyway.
Returning multiple errors from a Go function
A convenient way of returning multiple error values from a single function is to write a custom
MultiErrortype that itself imlements the
Applying a function to all result rows of another function in PostgreSQL
We want to apply function
bar()on every table row returned by function
foo(), then return primary key of table returned by
foo()together with all returned rows from
Beautify URLs in Jekyll
Jekyll can hide the .html extension by rewriting paths like
/dir/file/index.htmland then letting the webserver’s “default index” feature do the work. If you don’t want to use this (arguably dirty) trick you can produce extension-free URLs of normal HTML files yourself and let your webserver handle the rewrite.
If not otherwise specified, source code on this website is licensed under the 3-clause BSD license. You can find a copy here.
In any case, a backlink is appreciated.