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,836 other followers

Archive for the ‘Power User’ Category

linux – Bash: Command grouping (&&, ||, …) – Stack Overflow

Posted by jpluimers on 2020/02/18

Excellent answer at [WayBack] linux – Bash: Command grouping (&&, ||, …) – Stack Overflow by Charles Duffy:

Operator precedence for && and || is strictly left-to-right.

Thus:

pwd; (ls) || { cd .. && ls student/; }  && cd student || cd / && cd ;

…is equivalent to…

pwd; { { { (ls) || { cd .. && ls student/; }; } && cd student; } || cd /; } && cd ; }

…breaking that down graphically:

pwd; {                                      # 1
       {                                    # 2
         { (ls) ||                          # 3
                   { cd .. &&               # 4
                              ls student/;  # 5
                   };                       # 6
         } && cd student;                   # 7
       } || cd /;                           # 8
     } && cd ;                              # 9
  1. pwd happens unconditionally
  2. (Grouping only)
  3. ls happens (in a subshell) unconditionally.
  4. cd .. happens if (3) failed.
  5. ls student/ happens if (3) failed and (4) succeeded
  6. (Grouping only)
  7. cd student happens if either (3) succeeded or both (4) and (5) succeeded.
  8. cd / happens if either [both (3) and one of (4) or (5) failed], or [(7) failed].
  9. cd happens if (7) occurred and succeeded, or (7) occurred and succeeded.

Using explicit grouping operators is wise to avoid confusing yourself. Avoiding writing code as hard to read as this is even wiser.

–jeroen

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

100 km – how much needs to go into a tank? well2wheels/well to wheels (kWh).png at master · htc1977/well2wheels · GitHub

Posted by jpluimers on 2020/02/17

Since physics does not tend to change, this is still very accurate: [WayBackwell2wheels/well to wheels (kWh).png at master · htc1977/well2wheels · GitHub graphical WELL-TO-WHEELS Report Version 4.1 European Commission, 2014 – htc1977/well2wheels

A big picture is below the fold.

Other graphical file formats at [WayBack] GitHub – htc1977/well2wheels: graphical WELL-TO-WHEELS Report Version 4.1 European Commission, 2014

via:

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User, science | Leave a Comment »

Solved: Stuttering Audio Streaming To Apple TV Via AirPlay – The Spotify Community

Posted by jpluimers on 2020/02/17

[WayBack] Solved: Stuttering Audio Streaming To Apple TV Via AirPlay – The Spotify Community:

Try to disable Wifi multimedia (WMM) from your router’s WLAN settings

For my Tomato USB it was easy as described by [WayBack] Installing AirPlay on Tomato – 2017 Edition [StartupCTO]:

disabling WMM in Tomato. (Advanced Settings → Wireless).

–jeroen

Posted in ASUS RT-N66U, Internet, Network-and-equipment, Power User, Routers, TomatoUSB, WiFi | Leave a Comment »

When monitoring Windows service memory consumption from Zabbix and you get zeros

Posted by jpluimers on 2020/02/17

This is a small reminder to myself that when monitoring Windows service memory consumption from Zabbix and you get zeros, it means you need to monitor the Windows process instead of the service. The process will give you actual memory usage.

–jeroen

Posted in *nix, Monitoring, Power User, Zabbix | Leave a Comment »

Use Preview to combine PDFs on your Mac – Apple Support

Posted by jpluimers on 2020/02/14

From [WayBack] Use Preview to combine PDFs on your Mac – Apple Support :Learn how to combine PDFs and reorder, rotate, and delete pages.

Before editing your files: ensure you have a backup!

Combine two PDFs

  1. Open a PDF in Preview.
  2. Choose View > Thumbnails to show page thumbnails in the sidebar.
    (keyboard shortcut: AltCommand2)
  3. To indicate where to insert the other document, select a page thumbnail.
  4. Choose Edit > Insert > Page from File.
  5. Select the PDF that you want to add, then click Open.
  6. To save, choose File > Export.

You can also drag/drop from one thumbnail to the other, but this is tricky as you can easily modify the wrong file.

–jeroen

Posted in Apple, iMac, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, Power User | Leave a Comment »

 
%d bloggers like this: