Running notepad.exe as Administrator

Man, back on Windows for my new studio computer ‘verve‘. Needed to figure out how to edit C:\Windows\System32\drivers\etc\hosts and that was certainly more difficult than it needed to be.

In the end I used “Method 3” over here to add an “Open in Notepad (Admin)” item to my shell context menu:

  • Open regedit
  • Navigate to: HKEY_CLASSES_ROOT\*\shell
  • Add a new key ‘runas’ under ‘shell’
  • Change (Default) to: Open with Notepad (Admin)
  • Add a new key ‘command’ under ‘runas’
  • Change (Default) to: notepad %1

Earth leakage hack

Happy New Year! Best wishes to all my friends for 2024.

I have this weird problem with my new studio computer ‘verve‘. When I press the power button, it doesn’t turn on. It does have 15 USB cables plugged into it, and quite a number of those are powered, which seems to affect the system.

The power for most of the devices on my bench goes through a PowerShield Defender 1600VA UPS battery, and then through an Arlec PB91 Residual Current Device (RCD).

The RCD has a test feature so you can press the button on the RCD and it will trip the safety which will disconnect the power. If I do this most of the equipment on my bench will turn off (but, importantly, not my workstation ‘verve’) including all the powered USB devices which are interfering with my computer.

After I trip the RCD I can power on my computer, and then once it’s powered on I can reset the RCD and bench power is restored. It’s a bit fiddly but at least it works!

Setting Konsole title to $USER@$HOSTNAME

First: Settings -> Configure Konsole -> General -> Show window title on the titlebar (checked)

Then: System -> Configure Konsole -> Profiles -> [Default] -> Edit… -> Tabs:

  • Tab title format: %w
  • Remote table title format: %w

Then you need this config and these two shell functions in your .bashrc:

# 2023-12-29 jj5 - if not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# 2023-12-29 jj5 - set the Konsole window title
echo -ne "\033]2;$USER@$HOSTNAME\007" >&2

# 2023-12-29 jj5 - intercept ssh and sudo commands to reset window title on exit:
ssh() {
    /usr/bin/ssh "$@"
    echo -ne "\033]2;$USER@$HOSTNAME\007" >&2
}
sudo() {
    /usr/bin/sudo "$@"
    echo -ne "\033]2;$USER@$HOSTNAME\007" >&2
}

Transferring large files with Salt file.managed

Well, this took me a few hours to figure out.

If you’re going to be transferring large files using file.managed in your salt state, make sure you specify show_changes: False, otherwise salt will start trying to boil the ocean and calculate the unified diff of your enormous files.

The clue that this is the problem you're having is if one of your CPU cores pegs at 100% and your state doesn't apply in a reasonable amount of time (minutes, I guess).

Also you probably want to make sure you're not trying to use your large file as any sort of template. By default file.managed will assume no template, which is what you want for large files that aren't templates. I've never used large files which are templates, but I suspect if you tried that you'd have a bad time.

Chromium bug fixed!

For the past month or so I’ve had this intermittent problem where chromium would start crashing and would keep crashing every time I tried to start it until I rebooted.

Today I ran chromium under strace and straightaway discovered that it was trying to use shared memory in /dev/shm and it couldn’t because there was no space left.

There was no space left because I had PHP’s xdebug writing dump files there. I’ve just disabled xdebug while I’m not using it and after clearing out its old files I can now run chromium again.

I added a note about this to my debugging notes for in case this or something like it happens to me again.

ChatGPT explains “kebab”

ChatGPT explains “kebab”:

ChatGPT 4

User
please explain shish kebab, doner kebab, and the etymology of the word “kebab”

ChatGPT
Shish Kebab and Doner Kebab are two popular dishes that have their roots in Middle Eastern and Turkish cuisine, respectively. They are both variations of the broader concept of “kebab.”

Shish Kebab: This dish consists of small pieces of meat, often lamb, beef, chicken, or fish, that are skewered and grilled. The term “shish” refers to the skewer. Vegetables like bell peppers, onions, and mushrooms are also sometimes skewered and cooked alongside the meat. Shish kebabs are known for their smoky flavor and are commonly served with rice, salad, and various dipping sauces.

Doner Kebab: Originating from Turkey, “doner” kebab is made of meat cooked on a vertical rotisserie. The term “doner” means “rotating” in Turkish. Traditionally, lamb is used, but chicken and beef are also common. The cooked meat is then sliced off and served in a flatbread or pita, often accompanied by salads, vegetables, and sauces like yogurt or tahini.

The Etymology of “Kebab”: The word “kebab” is believed to have originated in the Middle East, and its first known mention dates back to a Turkish script of the 14th century. It likely stems from the Arabic word “kabāb,” which originally referred to fried meat, not grilled. Over time, the meaning evolved to refer to meat cooked over an open flame or on a skewer. The term spread with the expansion of the Ottoman Empire, adapting to various languages and culinary traditions. The concept of cooking meat on skewers is ancient, with evidence suggesting that such cooking methods were used in the prehistoric times. The popularity and variations of kebab dishes are a testament to their versatility and enduring appeal in different cultures around the world.

Interlude #2: Mail Call! Plus Two Old Books And A Floppy Disk | In The Lab With Jay Jay

This post is part of my video blog and you can find more information about this video on this show’s homepage which is here.

You can support this channel on Patreon: patreon.com/JohnElliotV

Silly Job Title: Ohm Oracle

Old Book: Electric Circuits by J. Richard Johnson published 1984 with 888 pages.

Today we pop open a few bags of stuff that has arrived in the mail.

I mention about the trouble I had with my Western Digital Purple drives.

I mention about my new Western Digital Black 1TB NVMe M.2 SSD WDS100T3X0E drives.

I mention about my Educational 555 PCBs which have arrived from PCBWay. The website of the designer is given as: basitelektronikprojeler.blogspot.com.

The systems of units mentioned in the old book Electric Circuits are discussed at MKS system of units and Centimetre–gram–second system of units.

The 256GB M.2 NVMe drives I got to use as my ZFS L2ARC cache are these: TOSHIBA KIOXIA 256GB BG5 NVMe SSD M.2 2280 – NEW GEN4.

The automotive fuses I got are these ones: Car Fuse Blade Fuse Kit Fuses Automatic Truck Blade The Fuse Insurance Insert Insurance of Xenon Piece Lights Auto Accessories.

The test clips I got are these ones: 10X Universal Chip clamp micro IC clamp SOP SOIC TSOP MSOP SSOP SMD IC Test Clip pin Socket Adpter Programmer for logic analyzer.

The book which arrived in the mail was The SCSI Bus and Ide Interface: Protocols, Applications and Programming (2nd Edition) by Friedhelm Schmidt published 1997 with 396 pages.

Thanks very much for watching! And please remember to hit like and subscribe!


Following is a product I use picked at random from my collection which may appear in my videos. Clicking through on this to find and click on the green affiliate links before purchasing from eBay or AliExpress is a great way to support the channel at no cost to you. Thanks!

OULLX NSS-681HDMI-RJ45 Cable TesterThis is an image of the product.notes

Let’s go shopping!