all repos — h3rald @ ec4049ade7360d46e84a7e68b9b86b9d57a73fed

The sources of https://h3rald.com

Merge branch 'master' of git@github.com:h3rald/h3rald.git
h3rald h3rald@h3rald.com
Thu, 07 May 2026 19:21:37 +0200
commit

ec4049ade7360d46e84a7e68b9b86b9d57a73fed

parent

f09179e7fd58d7b647614ed88233045b033a5505

M contents/articles/rawline-030.htmlcontents/articles/rawline-030.html

@@ -1,5 +1,5 @@

----- -title: "RawLine 0.3.0 released — now with Readline emulation" +title: "RawLine 0.3.0 released - now with Readline emulation" content-type: article timestamp: 1235890020 tags: "ruby|opensource|rawline"

@@ -16,7 +16,8 @@ <p>Some of you asked for Readline compatibility/emulation and that was actually not too difficult to implement: all the

bricks were already there, I just had to put them together in the right place.</p> <p>The <code>RawLine</code> module (you can spell it &#8220;Rawline&#8221; as well, if you wish) now behaves like <code>Readline</code>. This means that you can now use RawLine like this (taken from - examples/readline_emulation.rb):</p> + examples/readline_emulation.rb): +</p> <div class='ruby'> <pre><code>include Rawline

@@ -34,7 +35,8 @@ end</code></pre>

</div> <p>Basically you get a <code>readline</code> method, a <code>HISTORY</code> constant like the one exposed by Readline (Rawline's is a RawLine::HistoryBuffer object though &mdash; much more manageable), and a - <code>FILENAME_COMPLETION_PROC</code> constant, which provides basic filename completion. Here it is:</p> + <code>FILENAME_COMPLETION_PROC</code> constant, which provides basic filename completion. Here it is: +</p> <div class='ruby'> <pre><code>def filename_completion_proc lambda do |word|

@@ -81,7 +83,8 @@ etc. etc. <br />

Now you can imagine why it took me a few minutes to write the <code>filename_completion_proc</code> method (and why it will take you even less time to write your own similar method if you wanna do something different): you can access not only the last word being typed but also the current <em>and previous</em> lines (through - <code>Rawline.editor.history</code> or just <code>Rawline::HISTORY</code>)!</p> + <code>Rawline.editor.history</code> or just <code>Rawline::HISTORY</code>)! +</p> <p>It must be said, as usual, that Rawline is <em>not</em> a complete replacement for the Readline library yet (and it will probably never be, as Readline is huge!), but it's a good cross-platform, more Ruby-esque alternative to what's currently available by the Readline wrapper for Ruby.</p>
M contents/nimhttpd.mdcontents/nimhttpd.md

@@ -8,7 +8,7 @@ summary: "A tiny, self-contained program able to serve files within a directory via HTTP."

content-type: project active: true ci: true -version: 1.3.0 +version: 1.5.1 download: "https://github.com/h3rald/nimhttpd/releases/download/" ----- _NimHHTPd_ is a minimal web server that can be used to serve static files.
M templates/_archives.mustachetemplates/_archives.mustache

@@ -1,7 +1,5 @@

-<div class="container archives"> - <div class="timeline clearfix d-none"> <p> - This page lists all the <strong>{{articles-count}}</strong> articles I published on this site, sorted by publication month. + This page lists all the <strong>{{articles-count}}</strong> articles I published on this site since its creation in 2004, sorted by publication month. Sadly, I don't publish new articles as often as I used to, but anyway, they are all here. </p> {{#archives}} <h3>{{month}}</h3>

@@ -13,5 +11,3 @@ </li>

{{/articles}} </ul> {{/archives}} - </div> -</div>
M templates/grimoire.mustachetemplates/grimoire.mustache

@@ -12,7 +12,7 @@ </div>

<div class="row main-content"> <article class="{{content-type}} box content"> {{> _page_header}} - <div id="body-text" class="hyphenate"> + <div class="body-text hyphenate"> <p>A <em>grimoire</em> is a book of spells. If you &mdash;like me in the '90s&mdash; ever played <a href="https://en.wikipedia.org/wiki/Magic:_The_Gathering">Magic: The Gathering</a>, then you'll already know that.</p> <p>However, in this case we are not talking about conjuring unicorns or moving objects using telekinesis, but rather unlocking the
M templates/projects.mustachetemplates/projects.mustache

@@ -12,8 +12,8 @@ </div>

<div class="row main-content"> <article class="{{content-type}} box content"> {{> _page_header}} - <p>This page lists <strong>{{projects-count}}</strong> projects that I am currently working on or that I worked on in the past.</p> - <div id="body-text" class="hyphenate"> + <div class="body-text hyphenate"> + <p>This page lists <strong>{{projects-count}}</strong> projects that I am currently working on or that I worked on in the past.</p> {{#active-projects}} {{> _project}} {{/active-projects}}