The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for 2020

curl/wget: use content-disposition for the file names

Posted by jpluimers on 2020/04/27

For me, on Windows, curl works better than wget, but on Linux/Mac OS X, curl tends to work better. Some people find wget easier for downloading multiple URLs at the same time. So here the parameter switches for both so they download to the file specified by the Content-Disposition http header:

  • curl --remote-name --remote-header-name
  • wget --content-disposition

My experience is that wget is better at this, especially when redirects are involved (by adding a [WayBack] --location parameter to  thecurl command line).

So for instance the first fails, but the second succeeds determining the download to be VSCodeUserSetup-x64-1.27.2.exe (so curl keeps the name stable):

curl.exe --location --remote-name --remote-time --remote-header-name https://vscode-update.azurewebsites.net/latest/win32-x64-user/stable

wget.exe --content-disposition https://vscode-update.azurewebsites.net/latest/win32-x64-user/stable

This takes into account the name after all followed redirects.

Via:

–jeroen

Posted in *nix, cURL, Power User, wget | Leave a Comment »

Twitter thread unroll so you can read tweet storm on one page without distraction: ThreadReaderApp.com a.k.a. tttthreads.comtttthreads.com

Posted by jpluimers on 2020/04/24

I am have been using ThreadReaderApp.com – and more so since G+ went belly up – but forgot to schedule a post on it, so here it is:

[WayBack] Show HN: Unroll Twitter threads for easy reading | Hacker News:

I made this new service called Thread Reader that given a first tweet from a twitter thread will return a carefully designed web page with the full [WayBack] Tweetstorm unrolled.

It comes with two “bots” – one that answer people who mention “@tttthreads unroll” replying to the first tweet of a threads and give them a link to the unrolled story – the second that search twitter for “#threads” and check if it is a valid thread (> 5 tweets) and if so post a unrolled version back to the author (limited to a few post per hour to avoid to be too spammy)

The stack is good old LAMP using the PHP silex micro framework and of course Twitter API

[WayBack] Thread Reader Thread Reader helps you discover and read the best of Twitter Threads

–jeroen

Posted in LifeHacker, Power User, SocialMedia, Twitter | Leave a Comment »

This means your SD card is dead for writing: “fsck.ext4: unable to set superblock flags on ROOT”

Posted by jpluimers on 2020/04/24

A while ago I had a "fsck.ext4: unable to set superblock flags on ROOT" on an SD card in a Raspberry Pi: it basically means the SD card is dead.

Back then Google found only one entry: [WayBack] Bad Superblock – Raspberry Pi Forums

–jeroen

Posted in *nix, *nix-tools, Development, Hardware Development, Power User, Raspberry Pi | Leave a Comment »

Netgear Prosafe GS110TP – Tweakers

Posted by jpluimers on 2020/04/24

Interesting Power over Ethernet (PoE) capable router: [WayBack] Netgear Prosafe GS110TP – Tweakers

About the same price as [WayBackAmazon.com: Netgear Prosafe GS110TP

–jeroen

Posted in Ethernet, Network-and-equipment, Power User | Leave a Comment »

Unit testing frameworks in C#: Comparing XUnit, NUnit and Visual Studio · Raygun Blog

Posted by jpluimers on 2020/04/23

Still an interesting read: [WayBack] Unit testing frameworks in C#: Comparing XUnit, NUnit and Visual Studio · Raygun Blog

Posted in .NET, Development, Software Development | Leave a Comment »

Reminder: try to get vscode-restructuredtext to fully work – reStructuredText Language Support in Visual Studio Code

Posted by jpluimers on 2020/04/23

I love Visual Studio Code, but my initial tries to get [WayBackGitHub – vscode-restructuredtext/vscode-restructuredtext: reStructuredText Language Support in Visual Studio Code to work partially failed: editing works, but I got a non-descriptive error during preview.

All prerequisites are installed, so I needed to pause that for a while.

I still want it, as out of the box, [WayBack] Markdown editing with Visual Studio Code: Markdown Preview  works fine, but for complicated documents I tend to use reStructuredText.

Initial steps were simple, as per [WayBack] reStructuredText – Visual Studio Marketplace and editing is awesome (thanks to [WayBack] GitHub – lextm/restructuredtext-antlr: ANTLR Grammar for reStructuredText).

–jeroen

Read the rest of this entry »

Posted in .NET, Development, Lightweight markup language, reStructuredText, Software Development, Visual Studio and tools, vscode Visual Studio Code | Leave a Comment »

Bipartite matching algorithm in Delphi… John Kouraklis – Google+

Posted by jpluimers on 2020/04/23

In the thread is an actual implementation: [WayBack] I am looking for an implementation of Bipartite matching algorithm in Delphi or Pascal. Does anyone have a suggestion? Thanks – John Kouraklis – Google+

As I probably need it one day (:

–jeroen

Posted in Algorithms, Delphi, Development, Software Development | Leave a Comment »

Use the Unofficial Bash Strict Mode (Unless You Looove Debugging)

Posted by jpluimers on 2020/04/22

[WayBack] Use the Unofficial Bash Strict Mode (Unless You Looove Debugging):

#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

Explanation in the above post.

–jeroen

Posted in bash, Development, Scripting, Software Development | Leave a Comment »

When pandoc on a reStructuredText document gives “(WARNING/2) Inline substitution_reference start-string without end-string.”

Posted by jpluimers on 2020/04/22

When fixing some of the Pandoc conversion messages from … to html, I got this warning:

Network-Protocol-Security.rst:917: (WARNING/2) Inline substitution_reference start-string without end-string.

In my experience, the line numbers do not usually match, but in this case it was accurate (not the same as Network-Protocol-Security.rst#L874 because I was still editing it).

A search for “Inline substitution_reference start-string without end-string.” did only reveal occurrences, not causes, but “Inline substitution_reference start-string without end-string”

showed post with a cause: [WayBack] python sphinx – How to include an internal reference in a code block? – Stack Overflow pointing to [WayBack] reStructuredText Markup Specification: Substitution References.

Solution is either to

  • Escape |_ using a backslash like \|-.
  • Properly format code blocks using :: at the front and indents of the block

Lessons learned:

  1. When you get a pandoc message like substitution_reference, then search for it while substituting the underscore with a space inside the [WayBack] reStructuredText Markup Specification.
  2. Quoted strings to trim down Google search results, but you might want to leave out trailing punctuation.

Applying the lessons

Read the rest of this entry »

Posted in Development, Lightweight markup language, reStructuredText, Software Development | Leave a Comment »

Peter Drucker: The Rules of Effectiveness – Personal Growth – Medium

Posted by jpluimers on 2020/04/22

This is so simple and so hard at the same time: [WayBackPeter Drucker: The Rules of Effectiveness – Personal Growth – Medium:

  1. Design the Practice, Not the Person
    This means you have to set schedules when to do things and for how long.
    This is hard in an ever changing, ever interrupting world where tasks are of tough to estimate duration.
  2. Embrace Purposeful Abandonment
    Less+Less==More; which implies you should do a lot less things to be effective. Skip the things you do not really need.
  3. Switch From Exploring to Exploiting
    For me it was hard to understand, especially not being in my 20ies any more for a long time: high reward risky paths are better to be pursued than risk-averse paths.

The cool thing though: Peter Drucker found about all these during his life which was mostly (1909-2005) before computing and social network became ubiquitous.

So yes: the above should be possible in an agile environment.

–jeroen

via: [WayBack] Peter Drucker: The Rules of Effectiveness – Personal Growth – Medium – Marjan Venema – Google+

Posted in Agile, Development, LifeHacker, Software Development | Leave a Comment »