The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

xargs compressing lots of files using xz

Posted by jpluimers on 2019/11/20

One day, on a legacy Linux system, logrotate managed to skip some files in the middle of a sequence in /var/log.

Since I didn’t have time to sort out the cause (the system was being phased out), I used this to compress the rest of the log-files (dated in 2017):

sudo -u bash
pushd /var/log
ls | grep -vw xz | grep "\-20......$" | xargs -L 1 ls -alh

After that you can execute this in the same directory:

ls | grep -vw xz | grep "\-20......$" | xargs -L 1 time xz

It skips any xz files and includes only files in the year 2017.

I occasionally tracked progress with this:

ls -alh /var/log/ | grep -v xz | less

That got back a few gigabytes of disk space, just enough to help me migrate the system away.

–jeroen

Posted in *nix, *nix-tools, bash, logrotate, Power User | Leave a Comment »

git tag – How to delete a git remote tag? – Stack Overflow

Posted by jpluimers on 2019/11/20

When working with git, often the brevity of a solution is remarkable. Remembering how it can be so short is the hard part. An explanation why helps, for instance with [WayBackgit tag – How to delete a git remote tag? – Stack Overflow by markdorison.

He explains why you end up with:

git push --delete <origin> <tagname>

Here, <origin> is your remote, and <tagname> the tag to delete.

He explains other ways, which is done by [WayBackgist.github.com/mobilemind/7883996 as well:


# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push –delete origin tagName
git tag -d tagName

–jeroen

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

[Delphi] Delphi JSON Reformatter (text or html output) – Pastebin.com

Posted by jpluimers on 2019/11/19

I might need this in the future from Delphi: [WayBack] [Delphi] Delphi JSON Reformatter (text or html output) – Pastebin.com

Via [WayBack] I wrote a function to make JSON more readable, and naturally I wonder if I missed something crucial so that it eventually will break? There are probabl… – Lars Fosdal – Google+

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Return empty cell from formula in Excel – Stack Overflow

Posted by jpluimers on 2019/11/19

I never thought you could do it, but you can: [Archive.isReturn empty cell from formula in Excel – Stack Overflow.

You have to crate:

  • a VBA function
  • a reference to a range that evaluates the function so it returns blank
  • a cell with a function that blanks the cell using the range

Convoluted, but clever!

–jeroen

 

Posted in Development, Excel, Office, Office VBA, Power User, Software Development | Leave a Comment »

Angle brackets in markdowndown needs to be escaped

Posted by jpluimers on 2019/11/19

A few days after filing <path> disappears from "Preview" rendering and also from actual rendering (at least in issues), I realised that this is by intent: Markdown allows to [WayBack] inline html which means that code like below will be all treated as such:

<path>

> <path>

*<path>*

**<path>**

> *<path>*

> **<path>**

The solution is to either escape or quote with back-ticks:

`<path>`

> `<path>`

*`<path>`*

**`<path>`**

> *`<path>`*

> **`<path>`**

Since WordPress also is based on pseudo-HTML codes, it too needs escaping.
–jeroen

 

Posted in Development, Lightweight markup language, MarkDown, Power User, Software Development | Leave a Comment »

How to change the User Account Control (UAC) level in Windows | Digital Citizen

Posted by jpluimers on 2019/11/18

Based on, but much shorter than, [WayBack] How to change the User Account Control (UAC) level in Windows | Digital Citizen which summary is

How to change how UAC prompts are shown in Windows 7, Windows 8.1 and Windows 10. How to disable UAC when you no longer want it turned on.

  1. Run UserAccountControlSettings.exe
  2. Pull the settings up to the highest one
  3. Confirm

–jeroen

Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1 | Leave a Comment »

Download Earlier Versions of Office: 2010/2013

Posted by jpluimers on 2019/11/18

Not sure how long these will stay valid, but apparently my nl_office_professional_plus_2010_with_sp1_x86_x64_dvd_731121.iso was damaged (I forgot to check the hash) but I could download a fresh one from [WayBackDownload Earlier Versions of Office.

If you cannot find it by product key (I also tried it with a Visio one: worked fine too), then you can use [WayBackOffice 2010 direct link, X16-32250.exe, X16-32213.exe which are archived here:

–jeroen

via: [WayBack] Lost Office 2010 or 2013 CD/DVD? Legally Download Office From Microsoft

Posted in Office, Office 2010, Power User | Leave a Comment »

Intense Asymmetry and Self-Flagellation – @ASmartBear – WP Engine

Posted by jpluimers on 2019/11/18

Still so relevant: [Archive.isIntense Asymmetry and Self-Flagellation – @ASmartBear – WP Engine

Stop comparing yourself to something that is objectively incomparable.

via: [WayBack] Intense Asymmetry and Self-Flagellation – Marjan Venema – Google+

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

ÜberPDF printing using a Delphi like canvas

Posted by jpluimers on 2019/11/15

For my link archive, as it has a lot of goodies in the comments, especially on how to avoid bitmaps in PDF emission: [WayBack] We took PDF to a whole new level today Load create, or editing a PDF in 2 lines of code using a simple Delphi (like) Canvas! We added a PDFPrinter and… – Joe C. Hecht – Google+

–jeroen

Posted in Delphi, Development, EPS/PostScript, PDF, Software Development | Leave a Comment »

4 Ways to Jazz-up Product Descriptions (without Hype) | Practical Ecommerce

Posted by jpluimers on 2019/11/15

Probably by now everyone uses these 4 Ways to Jazz-up Product Descriptions (without Hype) | Practical Ecommerce [WayBack]:

According to Karon Thackston, author of Amazon Advantage: Product Listing Strategies to Boost Your Sales, successful ecommerce merchants avoid hype.

  • Sensory language.
  • Imaginative scenarios.
  • Unexpected vocabulary.
  • Conversational tone.

Provide Solid Info

At a minimum, keep your marketing copy free of over-promising, exaggeration, and pointless bragging. Make sure you’re providing solid information for potential buyers. Then, if you want, jazz-up your wording to heighten rapport.

–jeroen

via: [WayBack] Nice article on no hype product descriptions  – Michael Riley – Google+

Posted in LifeHacker, Power User | Leave a Comment »