Recent Changes

Updates since 2020-05-20 18:19 UTC up to 2020-06-19 18:19 UTC

1 | 3 | 7 | 30 | 90 days
List all changes Include rollbacks Include minor changes
List later changes RSS RSS with pages RSS with pages and diff

2020-06-15

  • 20:51 UTC (new) (history) 2020-06-15 Emacs, Org-mode, Beeminder and pomodoros . . . . mbork As some of my readers probably know, I am a happy user of Beeminder, and I even wrote my own Emacs- and Org-based Beeminder client. For some time, I’ve been thinking about somehow incorporating the famous pomodoro technique into my productivity quiver. The problem was, I did know how exactly to do it. Until today.

2020-06-08

  • 20:11 UTC (new) (history) 2020-06-08 Emacs as a (very simple) CAT . . . . mbork From time to time, I need to translate something (usually from English to Polish). Being an Emacs user, I obviously do the typing in Emacs. However, translating – as opposed to writing – has its own set of challenges. One of them is that I need to have two texts on the screen, and track my positions in both. While the “current position” in the active window is clearly marked with the point, this is not that helpful in the “other window” – while the point is visible there, it is usually not very prominent (even if you customize the cursor-in-non-selected-windows variable, which see). You probably expect where this is going to. Yes, I’m going to write such a tool myself.

2020-06-01

  • 06:20 UTC (new) (history) 2020-06-01 Node modules working as command-line scripts . . . . mbork Recently, I wanted to run one Node.JS CLI script from another. Of course, being in a hurry and KISS and whatnot, I decided to just use child_process.execFileSync with node as the first argument, but this is of course grossly inefficient. What if I could write a module usable both from the command line and other code? Well, it turns out that not only is this doable, but actually easy and robust.

2020-05-24

  • 08:17 UTC (new) (history) 2020-05-24 Two parameters and at least one required in yargs . . . . mbork I happen to write shell scripts in Node.JS quite often. They usually consume some kind of command-line agruments, and my library of choice to parse them is yargs. Recently, I had a situation where there were two parameters and it was required that one of them is given. A bit surprisingly, yargs does not seem to have an option requiredAlternative or something that says “of the following two parameters, at least one must be given” (it has a conflicts method and option, either of which can be used to say “of these two parameters, at most one may be given”, though). Happily, there is a simple way to enforce such a requiement due to the quite general “check” method.

More...

Filters