Find paragraph breaks in LibreOffice

To find paragraph breaks (i.e. the ASCII line feed character 0A hex)  in LibreOffice, use the currency symbol “$” as the search string.

Make sure to look into “Other options” and check “Regular expressions” in the “Find & Replace” dialog.

P.S.

By the way, searching for “\n” and replacing it with “\n” can be done only once, as on the repeated action there will be no matches found anymore and searching for “$” must be done instead. Read some more about this bug/feature/inconsistency here.

 


List fonts used in PDF document

If you want to see what fonts have been used in creation of a PDF document, you can use pdffonts utility of poppler-utils package for this. Just type:

  • pdffonts yourfile.pdf

Mount Truecrypt volume without Truecrypt

Some of you may have some old Truecrypt volumes lying around. Truecrypt was a nice and handy utility which is not developed anymore, unfortunately. But you still can mount the volumes created by it.

One way to do it on Ubuntu:

  • sudo cryptsetup tcryptOpen myvol.tc myvol

Where:

  • myvol.tc – the file name of your volume
  • myvol – arbitrary name of the virtual disk to be created

You will be asked for a passphrase, and if you still can remember it, the volume will be mounted under /dev/mapper with the name you provided and will show up as just another disk.


Set auto-increment field value in MySQL

You have a table. The table has a primary key auto-increment numeric ID field. You want to fast-forward the ID to a certain value (which is larger than or equal to the last value the field has).

Example, let the ID of the next entered record be 1000:

  • ALTER TABLE `mytable` AUTO_INCREMENT = 1000;

Validate your domain information

You may want to check if all the information available online in regard of your domain is complete and correct.

In such a case you can go to intodns.com and enter the address of your domain to verify the settings.

One thing you will often see failing is “Reverse MX A records (PTR)” for your mail server, and this is a good way to find out if everything is all right or not.


Video capture VirtualBox from command line

Start and then stop VirtualBox screen recording from command line for a headless Windows 10 session running in virtual machine named Win10:

  • VBoxManage controlvm Win10 videocap on
  • VBoxManage controlvm Win10 videocap off

Generate QR code

  • This simple command will give you an SVG file with QR code vector image in it:
echo "Hello world!" | qrencode --level=H --dpi=300 --type=SVG -o qr.svg
  • If a bitmap is enough, just type:
echo "Hello world!" | qrencode --level=H --dpi=300  -o qr.png

  • Even this simple command will work:
qrencode -o qr.png "Hi!"

  • Change the color from standard black to any if you like:
echo "Hello world!" | qrencode --foreground=808080ff --level=H --dpi=300 --type=SVG -o qr.svg
  • Alpha supported too:
echo "Hello world!" | qrencode --foreground=FFFF00FF --background=0000FF55 --level=H --dpi=300 -o qr.png
echo "Hello world!" | qrencode --foreground=FFFF00FF --background=0000FF55 --level=H --dpi=300 --type=SVG -o qr.svg