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

Archive for the ‘WSL Windows Subsystem for Linux’ Category

On my reading list: Windows Console and PTY

Posted by jpluimers on 2022/10/25

With the rise of *nix tools and infrastructure on Windows (including, but certainly not limited to Visual Studio Code and Windows Subsystem for Linux), I need to get acquainted to the new ways these interface to the Windows Console.

Since Windows Console is from the (now obsolete) UCS-2 days, so it is not even fully Unicode aware, and has trouble with UTF-8, UTF-16.

So here are some links for my reading list:

–jeroen

Read the rest of this entry »

Posted in *nix, *nix-tools, CommandLine, ConPTY, Console (command prompt window), Development, Linux, Power User, Software Development, Windows, Windows 10, Windows 11, Windows Development, Windows Terminal, WSL Windows Subsystem for Linux | Leave a Comment »

How can you export the Visual Studio Code extension list? (via: Stack Overflow)

Posted by jpluimers on 2022/06/16

Adapted from [Archive.is] How can you export the Visual Studio Code extension list? – Stack Overflow, presuming that code is on the PATH:

  1. From the command-line interface on MacOS, Linux, BSD or on Windows with git installed:
    code --list-extensions | xargs -L 1 echo code --install-extension
  2. From the command-line interface on MacOS, Linux, BSD or on Windows without git installed:
    code --list-extensions | % { "code --install-extension $_" }

    or, as I think, more clearly (see also [WayBack] syntax – What does “%” (percent) do in PowerShell? – Stack Overflow):

    code --list-extensions | foreach { "code --install-extension $_" }

    or even more explanatory:

    code --list-extensions | ForEach-Object { "code --install-extension $_" }
  3. From the command-line interface on Windows as a plain cmd.exe command:
    @for /f %l in ('code --list-extensions') do @echo code --install-extension %l
  4. On Windows as a plain cmd.exe batch file (in a .bat/.cmd script):
    @for /f %%l in ('code --list-extensions') do @echo code --install-extension %%l
  5. The above two on Windows can also be done using PowerShell:
    PowerShell -Command "code --list-extensions | % { """""code --install-extension $_""""" }"

    Note that here too, the % can be expanded into foreach or ForEach-Object for clarity.

All of the above prepend “code --install-extension ” (note the trailing space) before each installed Visual Studio Code extension.

They all give you a list like this which you can execute on any machine having Visual Studio Code installed and its code on the PATH, and a working internet connection:

code --install-extension DavidAnson.vscode-markdownlint
code --install-extension ms-vscode.powershell
code --install-extension yzhang.markdown-all-in-onex

(This is about the minimum install for me to edit markdown documents and do useful things with PowerShell).

Of course you can pipe these to a text-file script to execute them later on.

The double-quote escaping is based on [Wayback/Archive.is] How to escape PowerShell double quotes from a .bat file – Stack Overflow:

you need to escape the " on the command line, inside a double quoted string. From my testing, the only thing that seems to work is quadruple double quotes """" inside the quoted parameter:

powershell.exe -command "echo '""""X""""'"

Via: [Archive.is] how to save your visual studio code extension list – Google Search

–jeroen

Posted in *nix, *nix-tools, .NET, bash, Batch-Files, CommandLine, Console (command prompt window), Development, Mac OS X / OS X / MacOS, Power User, PowerShell, PowerShell, Software Development, Visual Studio and tools, vscode Visual Studio Code, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Development, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, WSL Windows Subsystem for Linux, xargs | Leave a Comment »

Windows chocolatey Wireshark install: ensure you install nmap too, so you have a pcap interface for capturing!

Posted by jpluimers on 2021/08/19

Wireshark is indispensable when doing network communications development or DevOps.

This is my choco-install-network-tools.bat batch file to install Wireshark and the pcap dependency which nmap provides:

choco install --yes nmap
:: wireshark requires a pcap for capturing; nmap comes with npcap which fulfills this dependency
:: see:
:: - https://chocolatey.org/packages/wireshark
:: - https://chocolatey.org/packages/win10pcap
:: - https://chocolatey.org/packages/WinPcap
:: - https://chocolatey.org/packages/nmap
choco install --yes wireshark

Yes, I know: Windows Subsystem for Linux could have an easier installation, but the above:

See:

–jeroen

Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, nmap, Power User, Software Development, Windows, Windows 10, Windows 8.1, WSL Windows Subsystem for Linux | Leave a Comment »

Excellent blog post from Jessica on how to setup the best Linux on Windows environment! @jldeen – via @shanselman

Posted by jpluimers on 2017/11/20

Via [WayBackScott Hanselman @shanselman: Excellent blog post from Jessica on how to setup the best Linux on Windows environment! @jldeen:

[WayBack] Badass Terminal: FCU WSL Edition (oh-my-zsh, powerlevel9k, tmux, and more!)

It’s that time again! The time to write another epic blog post, this time for WSL, also known as Windows Subsystem for Linux.

It requires Windows 10 Version 1709 (Fall_Creators_Update) which has build number 10.0.16299.

–jeroen

Read the rest of this entry »

Posted in *nix, Linux, Power User, Windows, Windows 10, WSL Windows Subsystem for Linux | Leave a Comment »

 
%d bloggers like this: