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 4,262 other subscribers

Archive for March 11th, 2021

Waarom stemmen we in Nederland niet online? | NU – Het laatste nieuws het eerst op NU.nl

Posted by jpluimers on 2021/03/11

Mooi stuk [Wayback] Waarom stemmen we in Nederland niet online? | NU – Het laatste nieuws het eerst op NU.nl

Is het veilig om tijdens de coronacrisis in het stemhokje te staan, vragen veel mensen zich op dit moment af. Waarom stemmen we nu eigenlijk niet online?

Samenvatting:

  • Vrij stemmen is buiten het stemhokje niet goed te controleren
  • Stemgeheim is biuten het stemhokje niet goed te controleren

Eigenlijk gelden beide ook voor briefstemmen.

Wat voor mij ook belangrijk is, is dat het uitleggen van normaal stemmen (inclusief controles en hertellingen) heel eenvoudig is uit te leggen, maar dat dit bij elektronisch stemmen veel moeilijker is.

Vanwege het belang van inzichtelijkheid zie ik online stemmen voorlopig daarom niet komen.

–jeroen

 

Posted in LifeHacker, Power User | Leave a Comment »

Mikrotik: script to set clock to Amsterdam, enable ntp, then show latest ntp correction

Posted by jpluimers on 2021/03/11

For my script list:

/system ntp client set enabled=yes server-dns-names=0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org
/delay 10
/system ntp client print

If the delay was long enough, you will see output like this:

             enabled: yes
         primary-ntp: 0.0.0.0
       secondary-ntp: 0.0.0.0
    server-dns-names: 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org
                mode: unicast
       poll-interval: 15m
       active-server: 149.210.230.59
    last-update-from: 149.210.230.59
  last-update-before: 29s290ms
     last-adjustment: 702us

If the delay was too short, the lines after mode will not be present.

–jeroen

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

GitHub – pastpages/savepagenow: A simple Python wrapper for archive.org’s “Save Page Now” capturing service

Posted by jpluimers on 2021/03/11

This makes it way easier to save WayBack content:

[WayBack] GitHub – pastpages/savepagenow: A simple Python wrapper for archive.org’s “Save Page Now” capturing service

A poor-mans alternative is the below bash script from [WayBack] Saving of public Google+ content at the Internet Archive’s Wayback Machine by the Archive Team has begun : plexodus:

For Linux, MacOS / OSX, BSD, and other Unix-like operating systems (including Android with Termux, or Windows, with a Unix/Linux environment), the following script (I’ve saved this as archive-url) will archive the requested URL:

#!/bin/bash
# archive-url
# Archive selected URL at the Internet Archive

curl -s -I -H "Accept: application/json" "https://web.archive.org/save/${1}" |
grep '^x-cache-key:' | sed "s,https,&://,; s,\(${1}\).*$,\1,"

Save that to your execution path (I’ve chosen ~/bin, you might use /usr/local/bin or another location on your $PATH, and invoke as, say (again referring to the G+MM homepage):

$ archive-url https://plus.google.com/communities/112164273001338979772

If you have a list of URLs in a file (or pipelined from command output), you can request all of them to be archived in a simple bash loop. I’m using xargs here to run ten simultaneous requests from the file gplus-urllist:

cat gplus_urllist | while read url do xargs -I{} -P 10 archive-url {}; done

I’ve run this on over 10,000 URLs over a modest residential broadband connection in a hair over two hours.

Note that such requests trigger an archive by the Internet Archive from one of its archiving nodes, you’re not sending the page to the Archive yourself. In particular, archival from regions defaulting to another language may result in the Google+ site content (but not post or comments) being in a different language. I’ve frequently seen my pages turning up in Japanese, for instance.

–jeroen

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

GExperts grep search: skipping searching certain files, irrespective of their directory

Posted by jpluimers on 2021/03/11

Especially when including [WayBack] form files (dfm now, but in the past also nfm and xfm) in your search, you might want to exclude one or more of them, for instance when they do not adhere to the form file syntax.

One of such files is for instance [WayBack] jcl/ExceptDlg.CBuilder32.dfm at master · project-jedi/jcl · GitHub. It has the contents is NONE (by intent, just like the corresponding .h and .cpp files, as only the Delphi equivalents .dfm and .pas have been implemented).

Doing this was way easier than I thought: just put ExceptDlg.CBuilder32.dfm in the “Exclude Dirs” field – which also excludes files. How cool is that!

–jeroen

 

Posted in Delphi, Development, GExperts, Software Development | 1 Comment »