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,862 other subscribers

Archive for the ‘Software Development’ Category

git add a revision before first commit – Google Search

Posted by jpluimers on 2023/03/21

Will need this one day to gain better insight on how git works under the hood: [Wayback/Archive] git add a revision before first commit – Google Search

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

llamasoft/polyshell: A Bash/Batch/PowerShell polyglot!

Posted by jpluimers on 2023/03/16

PolyShell is a script that’s simultaneously valid in Bash, Windows Batch, and PowerShell (i.e. a polyglot).

[Wayback/Archive] llamasoft/polyshell: A Bash/Batch/PowerShell polyglot!

Need to check this out, as often I have scripts that have to go from one language to the other or vice versa.

Maybe it enables one language to bootstrap functionality in the other?

The quest

The above polyglot started with a quest to see if I can could include some PowerShell statements in a batch file with two goals:

  1. if the batch file started from the PowerShell command prompt, then execute the PowerShell code
  2. if the batch file started from the cmd.exe command prompt, then have it start PowerShell with the same command-line arguments

The reasoning is simple:

  1. PowerShell scripts will start from the PATH only when PowerShell is already running
  2. Batch files start from the path when either cmd.exe or PowerShell are running

Lots of users still live in the cmd.exe world, but PowerShell scripts are way more powerful, and since PowerShell is integrated in Windows since version 7, so having a batch file bootstrap PowerShell still makes sense.

Since my guess was about quoting parameters the right way, my initial search for the link below was [Wayback/Archive] powershell execute statement from batch file quoting – Google Search.

I have dug not yet into this, so there are still…

Many links to read

These should give me a good idea how to implement a polyglot batch file/PowerShell script.

–jeroen

Posted in *nix, *nix-tools, bash, bash, Batch-Files, Development, JavaScript/ECMAScript, Perl, Polyglot, Power User, PowerShell, Scripting, Software Development | Leave a Comment »

For my reading list: some links on Twitter bookmarklets

Posted by jpluimers on 2023/03/15

Yup, web browser bookmarklets, though hardly published about any more, I still like them (and wrote about them before). With a little bit, usually unreadable, JavaScript, they can add magical functionality to your browser.

So here are some links on Twitter related bookmarklets:

All via [Wayback/Archive] twitter bookmarklet – Google Search.

–jeroen

Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

On my list of things to try: Live Share – Visual Studio Marketplace

Posted by jpluimers on 2023/03/14

I need to try [Wayback/Archive] Live Share – Visual Studio Marketplace and get a feel for how it is to live share code: is it a way of working that fits me well?

This installs Live Share for Visual Studio Code:

code --install-extension MS-vsliveshare.vsliveshare
code --install-extension MS-vsliveshare.vsliveshare-pack

The second extension is for [Wayback/Archive] Live Share Extension Pack – Visual Studio Marketplace, which got released about a year after the first one.

Live Share was introduced in 2017, a period when most of my work was outside the Visual Studio realm, Visual Studio Code was just starting to gain momentum over Atom (which was mul multi-platform editor of choice back then; I wrote about it in a few blog posts), and my then main development environment did not allow live sharing at all. so I missed all this (:

For my reading list:

Uses search queries:

  1. [Wayback/Archive] markdown online co-editing – Google Search
  2. [Wayback/Archive] visual studio code collaborative editing – Google Search
  3. [Wayback/Archive] vscode live share – Google Search

The first query was my initial goal to accomplish, but I rather have the markdown files available off-line, so these did not help:

–jeroen

Posted in atom editor, Development, Power User, Software Development, Text Editors, vscode Visual Studio Code | Leave a Comment »

Register for axe-con | Digital Accessibility Conference

Posted by jpluimers on 2023/03/10

Welcome, squad! Axe-con is committed to providing an accessible conference experience, and having free registration is key to this commitment.

Please fill in the following information on the form below to reserve your spot at axe-con 2023. Registration will provide you with access to the live sessions and on-demand recordings of 60 sessions.

[Wayback/Archive] Register for axe-con | Digital Accessibility Conference

Via [Wayback/Archive] CircuitSwan on Twitter: “Deque Systems axe-con 2023 Free Registration Building accessible experiences #a11y Virtual Conference: March 15-16th, 2023 Registration will provide you with access to the live sessions and on-demand recordings of 60 sessions.”

Related: Read the rest of this entry »

Posted in accessibility (a11y), Development, Software Development | Leave a Comment »

A pain in the ass: gist include image in markdown in current directory – Google Search

Posted by jpluimers on 2023/03/08

This revealed so much pain: [Wayback] gist include image in markdown in current directory – Google Search

I wished that – like in the past – it would work just like in a normal github hosted git repository: [Wayback/Archive] How do I display local image in markdown? – Stack Overflow.

The core problem is that though a gist underneath is a git repository, it is rendered in a way that is different than a github repository is rendered, and that way of rendering has changed over the years effectively making it difficult to embed a picture. When you do embed an image requires the uuid/guid of the raw image URL to be included in the markdown, unlike with a regular repository hosted on github.

That is so much pain that I decided to not host documentation in gists any more.

A bit of the pain:

This is an example gist where I tried to host an image: [Wayback/Archive] Windows 7 with PowerShell v2 fails to upgrade to PowerShell v3 through chocolatey: You must provide a value expression on the right-hand side of the '-' operator.

That gist was prelude to my post Chocolatey on Windows 7: “You must provide a value expression on the right-hand side of the ‘-‘ operator.”.

–jeroen

Posted in Development, DVCS - Distributed Version Control, gist, git, GitHub, Lightweight markup language, MarkDown, Software Development, Source Code Management | Leave a Comment »

linux – Newline-separated xargs – Server Fault

Posted by jpluimers on 2023/03/07

A long time ago, on just one system, I forgot which one, I needed explicit [Wayback/Archive] linux – Newline-separated xargs – Server Fault.

The simple solution was to replace the newline with null before running xargs:

tr '\n' '\0'

The clean solution was to install [Wayback/Archive] gnu xargs:

GNU xargs (default on Linux; install findutils from MacPorts on OS X to get it) supports [Wayback/Archive] -d which lets you specify a custom delimiter for input, so you can do

ls *foo | xargs -d '\n' -P4 foo 

–jeroen

Posted in *nix, *nix-tools, bash, Development, Power User, Scripting, Software Development, xargs | Leave a Comment »

Programming is hard; Peanut Butter and Jelly Sandwich: Exact Instructions Challenge – THIS is why my kids hate me. | Josh Darnit – YouTube

Posted by jpluimers on 2023/03/01

[Archive.is] Exact Instructions Challenge – THIS is why my kids hate me. | Josh Darnit – YouTube

We asked the kids to write instructions for a simple task but left out that we were going to be following their instructions EXACTLY as written. Great lesson for communication and a fun practice in patience!

Via [Archive] Maarten van Smeden on Twitter: “This is why programming is an acquired skill ” / Twitter

Q

It spurred all kinds of reactions about software development, like that programming should read like poetry, software development is about slowing down your thoughts, and that some high schools and some universities do this experiment at the start of their software development curriculum.

This is a cool experiment to do, even outside the USA, as many countries or regions have their own sandwich style, some of which are way harder to make than PB&J (:

Read the rest of this entry »

Posted in Conference Topics, Conferences, Development, Event, Software Development | Leave a Comment »

Wireshark Cheat Sheet – Commands, Captures, Filters, Shortcuts

Posted by jpluimers on 2023/02/28

[Wayback/Archive] Wireshark Cheat Sheet – Commands, Captures, Filters, Shortcuts

It is available both a huge [Wayback/Archive] jpg (2500×2096 pixels), so it already prints well on A5 or A4 sized paper for reference and as a [Wayback/Archive] PDF (so you can print it on even larger paper sizes).

Via: [Archive] Murdock (@Generic42) / Twitter in a DM.

–jeroen

Read the rest of this entry »

Posted in *nix, *nix-tools, Communications Development, Development, Hardware, Network-and-equipment, Power User, Software Development, Wireshark | Leave a Comment »

Don’t stick at version 3.7: How to Update Your Python Version Without Risk

Posted by jpluimers on 2023/02/22

For anyone else that things they are still stuck at Python 3.7 or older: [Wayback/Archive] How to Update Your Python Version Without Risk

Via [Wayback/Archive] CircuitSwan on Twitter: “#Python codebases are rarely updated due to time constraints, complexity & fear of breaking the build. Learn best practices to overcome this issue and reduce security risks! #100daysofcode”.

–jeroen

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