GeekTips
109 subscribers
586 photos
3 videos
77 files
231 links
Linux Mint, video encoding, ffmpeg, geek tips, regex, pdf manipulation, substitcher, mpv config
Download Telegram
Clones
Writeable snapshots ("clones") can also be created, resulting in two independent file systems that share a set of blocks. As changes are made to any of the clone file systems, new data blocks are created to reflect those changes, but any unchanged blocks continue to be shared, no matter how many clones exist. This is possible due to the copy-on-write design.

Sending & Receiving Snapshots
Snapshots of ZFS file systems and volumes can be sent to remote hosts over the network. This data stream can be an entire file system or volume, or it can be the changes since it was last sent. When sending only the changes, the stream size depends on the number of blocks changed between the snapshots. This provides a very efficient strategy for synchronizing backups.
create a initial snapshot

zfs snapshot zfsbaby/data@initial 

send it (initial snapshot) to another local pool, named ''zfskid'', and calling the dataset ''storage''

zfs send zfsbaby/data@initial | zfs recv -F zfskid/storage 

send it to a remote pool, named ''zfsadult'' at remote side

zfs send zfsbaby/data@initial | ssh remotehost zfs recv -F zfsadult/data 

after using ''zfsbaby/data'' for a week, create another snapshot

zfs snapshot zfsbaby/data@2022-09-18T22-30 

incrementally send the new state to remote

zfs send -i initial zfsbaby/data@2022-09-18T22-30 | ssh remotehost zfs recv -F zfsbaby/data
Add a spare (hot-swap drive) if one fails ZED will tell it to automatically do a sequential resilver.

zpool add -f zfsbaby spare sdg

Add an additional disk to pool

zpool add -f zfsbaby sdg

Replace a corrupted disk (sdg=corrupted sdh=new)

zpool replace zfsbaby sdg sdh

Destroy a pool

zpool destroy zfsbaby 

View Input/Output stats every 11 seconds, ctrl-C stop

zpool iostat 11

Move pool to a new system first export it then import it

zpool export zfsbaby

zpool import zfsbaby

Create a new pool using RAIDZ1 using -f (force) if data on disks

zpool create raidz1 sdb sdc sdd

Create a new pool using RAIDZ2

zpool create raidz2 sdb sdc sdd sde sdf
To remove line breaks, line endings, paragraph marks automatically. If you copy and paste text from a PDF you always get unwanted line breaks and the text doesn't flow.

Best way is to use the online website https://removelinebreaks.net/
as it can convert paragraphs to Double Line

also this one can too
https://anytexteditor.com/remove-line-breaks

But sometimes you need to choose Base number of chars (x) Manual 89 for Double Line to work.

On Linux in LibreOffice Writer
— View - check Formatting Marks to be able to view the Paragraph marks

— Edit / Find & Replace and check Regular expressions ...find: $ and Replace: [space]

But still need to put all the line breaks and double line so it's not a solution. But I finally created a macro in LibreOffice to remove line breaks https://t.iss.one/geektips/270
Firefox I only use two extensions —

for dark mode on websites I use
Dark Background and Light Text
and just press F2 to toggle light/dark mode

Global Preferences
Default foreground color #dcdccc
Default background color #333333
Default link color #ad7fa8
Default visited link color #ffafff
Default active link color #ff0000
Default selection color #d3d7cf

uBlock Origin
which is an ad blocker and any other element on a website you wish to block out.

DownThemAll!
which lets you download all images or mp3s on a web page.

Install then Tools | Add-ons & Themes
Record video from your iphone or ipad. Compile and install rpiplay and start it in a terminal by typing rpiplay
https://github.com/FD-/RPiPlay
type rpiplay to start
to stop it do CTRL-C
then on your ipad or iphone from the menu choose Screen Mirroring
Use SimpleScreenRecorder and make sure PulseAudio is checked if you wish to do voiceover for your video.

https://www.maartenbaert.be/simplescreenrecorder/
use x264 and not x265 to not have any dropped frames. You will want to re-encode it anyway to massively reduce file size with x265. Audio codec Vorbis seemed best at 64kbps.

Sometimes if trying to capture game footage if the ipad screen barely changes but you made a move in the game you have to move the screen a tad for it to detect motion. Doesn't have all the time but it does happen.
this is the ffmpeg command I use in video mass to replace a video audio track with a new audio track

-i "/home/me/Music/musicsong.opus" -c:v hevc -crf 28 -vf scale="-2:720" -c:a copy -strict -2 -map 0:v:0 -map 1:a:0 -map_metadata 0 -shortest
More PDF apps...covered how to highlight / annotate PDFs and reduce the file size of PDFs here https://t.iss.one/geektips/11

To clean metadata from PDFs use metadatacleaner (flatpak is huge like 600MB but what can we do besides compile from source)
https://gitlab.com/rmnvgr/metadata-cleaner/

You can also clean other types of files like images and various office documents. Can't drag and drop files and folders but can do through the file dialog. Works great.

Also has a lightweight option so it doesn't completely change too much but most likely you'll hardly ever have to use it.
On Mac I would use Adobe Acrobat Pro to do OCR and it did the best job especially with a white or light background. If the background was black or dark it would ignore it. It maintained the original layout always.

Linux I use ocrmypdf which is a command line tool
sudo apt install ocrmypdf

ocrmypdf input.pdf output.pdf
It OCRs (Optical character recognition) the file and doesn't touch the images and overlays the text on top of it so it's searchable, selectable and can be copied.
Make PDF booklets or make booklets into linear documents. If you want PDF pages into one page for instance.

https://kjo.herbesfolles.org/bookletimposer/

sudo apt install bookletimposer
Bookletimposer convert this document into a 4 page layout per page.
Bookletimposer here is what it looks like once converted to a 4 page layout
Shotcut Keyboard Reference.pdf
54.7 KB
Shotcut (open source video editor multiplatform). Here is a 2 page PDF keyboard reference for Windows and Linux. I didn't have room for Mac shortcuts unfortunately. PDF is formatted by taking shortcuts from the web page shotcut.org
Best way to download many videos from youtube, odysee, bitchute, etc use videomass

sudo apt install videomass

or use yt-dlp (can download age restricted videos from youtube without needing to sign in)

sudo pip3 install yt-dlp

yt-dlp https://www.youtube.com/watch?v=2ob0Hwydke
(just an example URL)

If you wish to use a website here are three which are ok for that purpose (but none can do age-restricted videos)
https://distillvideo.com
https://mp3conv.cc
https://pastedownload.com
to make fancy text graphics online use either this one
https://cooltext.com/