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 2016

A bash script to btrfs snapshot details like disk sizes (requires btrfs quota to be enabled)

Posted by jpluimers on 2016/09/06

One thing I’ve not figured out yet is this: How does enabling btrfs quotas impact the system? – Unix & Linux Stack Exchange

My gut feeling says it’s not much. But if someone knows: please chime in.

Anyway: btrfs quota support helps you to see how big snapshots (and other subvolumes) are.

Enabling and disabling is easy (the slash is the path from where to enable quota):

btrfs quota enable /

btrfs quota disable /

The bad thing is that there is no command that gives just the quota status. You have to revert to btrfs qgroup show /

This will show you quota groups when quota are enabled:

qgroupid         rfer         excl 
--------         ----         ---- 
0/5          16.00KiB     16.00KiB 

or errors when quota are disabled either of these two errors:

# btrfs qgroup show /
ERROR: can't perform the search - No such file or directory
ERROR: can't list qgroups: No such file or directory

# btrfs qgroup show /
ERROR: can't list qgroups: quotas not enabled

You might also want to check the syslogs as there was a [PATCH 1/2] btrfs: syslog when quota is enabled.

The btrfs qgroup output is the base for agronick/btrfs-size: A script that will print out a list of BTRFS subvolumes along with their size in megabytes and their name.

It actually shows it in human readable form (kilo/mega/giga/… bytes) and is documented at Get the size of your BTRFS Snapshots | PoisonPacket. It gives me a nice overview that corresponds to the snapper list output (see below).

The script has two drawbacks:

./btrfs-size/btrfs-size.sh: line 55: can't + 0: syntax error: invalid arithmetic operator (error token is "'t + 0")

  • it can take a while for btrfs quota enable / to actually deliver the quota for all the qgroupid values snapper uses. Until that time, the columns ID/Total/Exclusive Data are empty.
  • it won’t warn you if the quota data is out of data; to check that, run the below script

# btrfs qgroup show / > /dev/null
WARNING: Qgroup data inconsistent, rescan recommended

In that case, run btrfs quota rescan / and wait for it to complete by running this command until the warning is gone:

# btrfs qgroup show / > /dev/null
WARNING: Rescan is running, qgroup data may be incorrect

If the warning reverts to WARNING: Qgroup data inconsistent, rescan recommended then you might see the effects from this bug and should not worry about it: Bug 933428 – btrfs qgroup – allways shows WARNING: Qgroup data inconsistent.

For more btrfs quota background information, see: UseCases – btrfs Wiki.

–jeroen

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux, Tumbleweed | 1 Comment »

installing the UTF-8 encoding ftfy (fixes text for you) – via version 3.0 | Luminoso Blog

Posted by jpluimers on 2016/09/06

Simple if you know it:

pip install ftfy

That installs it as a command which is a lot easier than using it from Github at [Waybackhttps://github.com/LuminosoInsight/python-ftfy

It knows how to solve the encoding issues in [Archive.is]  the future of publishing at W3C explaining about WTF-8 and Unicode history.

It didn’t solve my non-Unicode encoding issue: [Wayback] “v3/43/4r” -> “v¾¾r” -> “vóór”.

Read the rest of this entry »

Posted in Development, Encoding, ftfy, Mojibake, Software Development, Unicode, UTF-8, UTF8 | 4 Comments »

Delphi Bootcamp live streams (will edit this over time).

Posted by jpluimers on 2016/09/05

Delphi Boot Camp with 100% off Delphi

Day 1: https://www.youtube.com/watch?v=-YUMUHh7Wpw Introduction to Delphi: The IDE and Your First App (FireMonkey app) – edited https://www.youtube.com/watch?v=2rwaQN_O3bU

Day 2: Getting to Know the Delphi Language – edited https://www.youtube.com/watch?v=CqlHeBPKu-0 

Day 3: https://www.youtube.com/watch?v=JyiuOz_zMXA Building Effective User Interfaces in FireMonkey – edited https://www.youtube.com/watch?v=gnsppAa5MxA

Day 4: https://www.youtube.com/watch?v=JyiuOz_zMXA Game Development with Delphi – edited

Day 5:

Day 4:

Day 3: edited

Day 3:

Day 2: edited

 

Day 1: edited

Day 1:

 

 

 

 

Posted in Delphi, Delphi 10.1 Berlin (BigBen), Development, Software Development | Leave a Comment »

Some links on creating bootable USB sticks from ISO media (for a Linux rescue CD)

Posted by jpluimers on 2016/09/05

These did help me a lot:

In the end: UNetBootin with the knoppix image worked fine. Alt Linux Rescue failed (it copied fine, but it had a kernel panic upon boot).

Downloads I tried:

Commands

  • fdisk -l | grep sd
  • smartctl -a /dev/

–jeroen

Posted in Power User | Leave a Comment »

Word for Windows Keyboard Shortcut for Find Next – Super User

Posted by jpluimers on 2016/09/05

Unlike most applications where F3 is search next, Office has their own thought about keyboard shortcuts.

So in Word for Windows, you can use these:

  • Find next:
    • “RepeatFind”: Shift+F4 or Ctrl+Alt+Y.
    • “Browse next item”:  Control+PageDown.
  • Find previous:
    • “Browse previous item”: Control+PageUp.

–jeroen

via:

Posted in Keyboards and Keyboard Shortcuts, Office, Power User, Word | Leave a Comment »

linux – How do I increase the scrollback buffer in a running screen session – Stack Overflow

Posted by jpluimers on 2016/09/04

The man page explains that you can enter command line mode in a running session by typing Ctrl+A, :, then issuing the scrollback <num> command.

Source: linux – How do I increase the scrollback buffer in a running screen session – Stack Overflow

Posted in Uncategorized | Leave a Comment »

Lock screen dialer shortcut gone in 6.0 – Android Forums at AndroidCentral.com

Posted by jpluimers on 2016/09/02

Solution:

  1. Go to Settings
  2. Click Apps
  3. Click
  4. Gear Icon
  5. Click Default Apps
  6. Click Assist & voice input
  7. Click Assist app.
  8. Changing that to None instead of Google App puts the dialer shortcut back on the lock screen, but it also disables long pressing the home button to launch the Google App/Now.

–jeroen

Source: Lock screen dialer shortcut gone in 6.0 – Android Forums at AndroidCentral.com

Posted in Android Devices, OnePlus Two, Power User | Leave a Comment »

tf: show changeset details on the console

Posted by jpluimers on 2016/09/02

By default the changeset command in tf.exe shows a dialog showing a list of all files in that changeset.
I wanted that list to be dumped on the console for further processing.

Luckily there is a /noprompt option for that:

call "%~dp0tf.bat" changeset /noprompt %*

The above tf-show-changeset-details-on-console.bat batch file uses tf.bat that hunts for the location of tf.exe.

–jeroen

Posted in .NET, Development, Software Development, Source Code Management, TFS (Team Foundation System) | Leave a Comment »

Raspberry Pi voordeel set | SosSolutions.nl

Posted by jpluimers on 2016/09/01

Raspberry Pi voordeel bundels. Raspberry Pi supersnel en gratis bij u thuisbezorgd! Want bij ons geldt; voor 16:00 besteld? Morgen in huis!

Source: Raspberry Pi voordeel set | SosSolutions.nl

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Delphi: Alt+Down Arrow is the keyboard shortcut for ellipsis buttons

Posted by jpluimers on 2016/09/01

Thanks Primož Gabrijelčič for reminding me on Stack Overflow that Alt + Down opens the dialogs behind ellipsis buttons in the Delphi IDE.

It’s the CUA and Windows short-cut to open drop-down lists (comboboxes) and for opening drop-down list for a property in the object inspector, but I never realised also would work for these ellipsis buttons.

This was my original stack-overflow question: Is there a keyboard shortcut for the ellipsis buttons of the Project Options in the Delphi IDE?

The Project Options in the Delphi IDE has a few option (like the Search Path) each with an ellipsis button (the one on the right having only three dots ... in the image below) to pop-up a dialog.

What keyboard shortcut activates that button?

Project Options with ellipsis button

–jeroen

Via: Object Inspector Keyboard Shortcuts – RAD Studio

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Keyboards and Keyboard Shortcuts, Software Development | Leave a Comment »