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 ‘Power User’ Category

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 »

Way easier to fix on Intel MacBook machines than I thought: macos kernel_task high cpu dual screen

Posted by jpluimers on 2023/03/13

The links found via [Wayback/Archive] macos kernel_task high cpu dual screen – Google Search were daunting.

In the end, the issue ways way easier to fix than I thought: open up your Intel MacBook (you need pentalobe screwdrivers for that), then with some compressed air, clean the dust (especially from the fans).

This post saved my day [Wayback/Archive] kernel_task takes up 500% of my CPU when plugging in external monitor – MacBook Pro 15″ Retina Display Mid 2015 – iFixit

Things I haven’t tried yet:

  • Cleaning out more free space from HDD
  • Using plain HDMI cable into the HDMI cable port
  • Taking MBP apart and cleaning any potential dust


Block Image

I faced the very same issue that you guys are facing and based on input from another forum decided to get my 2016 MPB fans cleaned out.

This made an immediate impact where when I connected my external display to the MBP.pre-cleaning, it would overheat causing the fans to spin at 6000 rpm or thereabout and the kernel_task would eat up 500%-900% of the CPU rending the system unusable.

This simple cleanup of the fans has allowed me to connect the monitor with no kernel panic anymore and even though the fans run around 5000 rpm now the CPU and GPU are running around 10 degrees cooler now.

The same picture is in [Wayback/Archive] macos – MacBook Pro high CPU with external monitors – Ask Different.

An even dirtier MacBook was at [Wayback/Archive] External Display – High CPU Usage – MacBo… – Apple Community.

Links that were interesting but unhelpful:

–jeroen

Read the rest of this entry »

Posted in Apple, Mac, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Power User | Leave a Comment »

Jvc Compulink Control Cable are just mono mini audio jacks

Posted by jpluimers on 2023/03/10

–jeroen

Posted in Hardware, Home Audio/Video, Power User | Leave a Comment »

My little tray with neodymium magnets for holding little screws while servicing equipment 

Posted by jpluimers on 2023/03/09

From an interesting thread where Iris Classon had laptop overheating problems (just like I had with a 2015 Retin MacBook Pro in Cleaning the cooling fans of a 15-inch Retina MacBook Pro 2015 model):

My tray is from the lid of a broken container.

I love repurposing the remains of old household items..

The actual problem: dust, just like my MacBook had.

Read the rest of this entry »

Posted in Development, DIY, Hardware Development, LifeHacker, Power User | 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 »

UniFi – Install a UniFi Cloud Controller on Amazon Web Services – Ubiquiti Networks Support and Help Center

Posted by jpluimers on 2023/03/06

I was not aware you could this: [WayBack] UniFi – Install a UniFi Cloud Controller on Amazon Web Services – Ubiquiti Networks Support and Help Center

Giving it a bit more thought, I’m not sure I would want this, as it would presume you have an internet connection that is up on the WAN side.

You’d need this before installing any of your Unify equiment, even when installing your first Unify router, which would mean a chicken and egg problem.

Also it would mean you can only use the cloud key when the WAN is down, you cannot use the cloud-key, not even locally.

–jeroen

Posted in Cloud Key, Network-and-equipment, Power User, Unifi-Ubiquiti | Leave a Comment »

English time @engIishtime on Twitter with AltTextCrew alt-text: INFORMAL versus FORMAL English terms

Posted by jpluimers on 2023/03/03

[Archive] Alt Text Crew on Twitter: “@jpluimers Repost parent tweet with extracted text in image descriptions https://t.co/OETTugffrm” / Twitter

INFORMAL FORMAL find out ascertain free release obtain get get in touch with contact It concerns purchase It's about buy keep leave out let retain omit permit examine look at make up fabricate need to required point out put off put up rack up ring up indicate delay tolerate accumulate call orry apologise appear establish seem set up show illustrate show up stand for arrive represent start commence think about consider

The original tweet [Archive] did only contained the image, so here is the OCR of the text:

INFORMAL FORMAL
find out ascertain
free release
get obtain
get in touch with contact
It’s about It concerns
buy purchase
keep retain
leave out omit
let permit
look at examine
make up fabricate
need to required
point out indicate
put off delay
put up tolerate
rack up accumulate
ring up call
orry apologise
seem appear
set up establish
show illustrate
show up arrive
stand for represent
start commence
think about consider

–jeroen

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

Canarytokens

Posted by jpluimers on 2023/03/02

Cool: [Wayback/Archive] Canarytokens

Canary tokens are a free, quick, painless way to help defenders discover they’ve been breached (by having attackers announce themselves.)

How tokens works (in 3 short steps):

  1. Visit the site and get a free token (which could look like an URL or a hostname, depending on your selection.)
  2. If an attacker ever uses the token somehow, we will give you an out of band (email or sms) notification that it’s been visited.
  3. As an added bonus, we give you a bunch of hints and tools that increase the likelihood of an attacker tripping on a canary token.

The above documentation is just a small portion of what is at [Wayback/Archive] Canarytokens.org – Quick, Free, Detection for the Masses with even more documentation starting at [Wayback/Archive] Introduction | Canarytokens.

Source code (either the site or a docker image):

It is provided by [Wayback/Archive] Thinkst Canary.

I learned it at the height of the Log4Shell mitigation stress. Some related posts from that period:

Via: [Archive] ᖇ⦿ᖘ Gonggrijp on Twitter: “IP in Luxembourg, owned by Frantech Solutions from Cheyenne, WY. Judging from a quick round of Google appears to be a bulletproof VM hoster, with clients to match. ” / Twitter

Below image via [Wayback/Archive] Tweet2Img.com | Perfect Tweet screenshots with just one click

jeroen

Posted in Power User, Security | Leave a Comment »