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
Timeshift is a backup utility for your system files only. I recommend set it to once a week and just keep one snapshot if something goes wrong you can restore a snapshot. In the screenshot it shows 20.2 which I could revert back to in case 20.3 upgrade didn't go smooth. No need to though as it went without a hitch as expected.
Mozilla makes Firefox and even though they're a terrible organization it’s their browser I use on Linux. So by default the security settings are a joke. So configure your settings like so for somewhat of privacy.
Firefox — Settings — Search

DuckDuckGo is still own by #$^$#^ but better than alternatives. Don't let Firefox provide search suggestions that means you'd be allowing it to use it's recommended algorithms to influence you.
Firefox — Settings — Cookies and Site Data

Delete cookies and site data when Firefox is closed. This keeps your History nice and clean. Don't let it remember your logins and passwords nor fill out forms. Instead use authpass as a password manager.
Firefox — Settings — History

These are the custom settings I use

Don't let Firefox Suggest you anything except your Bookmarks. Don't send any usage data, research data, help them improve, etc. It's all just a bunch of spyware.
Only optimizing a PDF for file size and no need to OCR it so from 20.3MiB —> 10.7MiB.

-s is same as —skip-text (skips text if already OCR'd)
-O (that's a letter O not a 0 zero) - - optimize and 3 does aggressive lossy optimizations (including lossy JBIG2)
- - skip-big tells it to skip any page over 0.1 Megapixels (which would be every page)

ocrmypdf -s -O 3 --skip-big .1 some.pdf some_optimized.pdf
Scan: 100%|███████████████████████████████████████████| 399/399 [00:35<00:00, 11.28page/s]
INFO - Start processing 4 pages concurrently
The LibreOffice suite includes several
tools, including:

Writer - the word processor (MS Word)

Calc - the spreadsheet (MS Excel)

Impress - the presentation tool (MS Powerpoint)

Draw - for diagrams, flowcharts, leaflets, etc. (MS Visio)

Base - for databases (MS Access)

Math - to create formulas

If not using Base for a quicker start up time go to Tools | Options | Advanced and uncheck Use a Java runtime environment

When saving an odt choose Hybrid if you wish to embed the odt file within the PDF making it editable later with LibreOffice Writer although at a cost of file size.
Exifcleaner cleans out exif data in images and metadata from videos and PDFs. It can be installed by downloaded a .deb file or appimage. I do like it better than Metadatacleaner even though that one has gone down from 600MB to 68MB recently. It has darkmode and you can drag files onto it compared to the other one you couldn't.
Qprompt.app is a free teleprompter. Works well and can mirror on two screens so one can control and other can display to speaker. Download appimage.
google translate is evil so deepl.com is better but has its limitations

You are using the free version of DeepL
Translate up to 5,000 characters
Translate 3 locked documents/month
10 glossary entries

You can upload pdf, docx or pptx files for now those on debian / ubuntu / linux mint most likely the upload files won't work.

If you upload a PDF for translation on deepl it sends it to Adobe
For technical reasons, your PDF will be sent to Adobe Inc. in the US. Read more in our Privacy Policy.

File has too many characters for the free translator
The free translator has a limit of 100,000 characters per file.
Try a 30-day free trial of DeepL Pro to translate files up to 1 million characters.

For super privacy get your own free OFFLINE translation.

However, the translation isn't nearly as good as deepl but for the average user it suffices to give you the gist of it.

https://libretranslate.com and see if you're satisfied with the results or not. If so then install your own offline version on linux. You can upload docx and pptx

libtranslate supports uploading these formats for translation
https://libretranslate.de
Supported file formats: .txt, .odt, .odp, .docx, .pptx

sudo pip install libretranslate

Think it downloads a little over 900MB and after all that's installed when you first run libretranslate it'll take a few hours or even half a day to update the language models

Loaded support for 24 languages (46 models total)!
Installing transliteration models for the following languages: ar, az, zh, cs, nl, fi, fr, de, hi, hu, id, ga, it, ja, ko, pl, pt, ru, es, sv, tr, uk, vi
Serving on https://localhost:5000

Now just bookmark in your browser localhost:5000 and feel free to turn off your wifi / internet connection to verify it translates offline

I don't recommend Libretranslate as it seems to use an older version of argos translate. So for now I just use argo-translate-gui
Example here is original German

Von ihnen haben nur rund 77 Millionen, oder 37 Prozent, zusätzlich eine Auffrischungsimpfung bekommen. Nun geht die Regelung zur abschließenden Prüfung wieder zurück an eine niedrigere Instanz.

Die konservativen Richter betonten in einer Begründung, dass sie nicht über die Berechtigung einer Impfpflicht an sich befunden hätten, sondern über eine Frage der Gewaltenteilung: War die Anordnung rechtmäßig und ist die Bundesbehörde dafür zuständig?


deepl translation
Of those, only about 77 million, or 37 percent, have received additional booster shots. Now the rule goes back to a lower court for final review.

The conservative justices emphasized in a statement of reasons that they were not ruling on the merits of mandatory vaccination per se, but on a separation-of-powers issue: was the order lawful and does the federal agency have jurisdiction over it?

google translation
Of them, only around 77 million, or 37 percent, received an additional booster vaccination. Now the regulation goes back to a lower authority for the final examination.

In a statement of reasons, the conservative judges emphasized that they had not ruled on the justification for a compulsory vaccination per se, but on a question of the separation of powers: Was the order lawful and is the federal authority responsible for it?

argos-translate-gui
Of them, only around 77 million, or 37 percent, received an additional booster vaccination. Now the regulation goes back to a lower authority for the final examination.

In a statement of reasons, the conservative judges complaint that they had not ruled on the justification for a compulsory vaccination per se, but on a question of the separation of powers: What the lawful and is the federal authority responsible for it?


libretranslate locally install on linux mint
of
those, only about 77 million, or 37 percent, have received additional booster shots. now the rule goes back to a lower court for final review.

the conservative justices suspended in a statement of reasons that they were not ruling on the merits of mandatory vaccination per se, but on a separation-of-powers issue: what the order lawful and does the federal agency have jurisdiction over it?
These two are the main presets I use in videomass

1) hevc 265 libopus 32kpbs crf 28 output to mp4. I don't always upscale or downscale to 720p so just delete that part if not. Sometimes change crf to 23 for a movie or crf to 31 if old VHS quality. Video file sizes are super small.

-c:v hevc -crf 28 -c:a libopus -b:a 32k -strict -2 -vf scale="-2:720"

2) replace audio and rescale to 720p and output to mp4. I double click on hahaha then paste in the name of music track I copied from the file manager. -shortest option cuts the audio off at the same time the video ends. Make sure audio / music duration is longer than the video duration.

-i "/home/mint/Music/hahaha.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
I use Fotoxx for montages and adding text and masking. Here I have an ice cream with a white background which I want taken out.

In Fotoxx Composite | Mashup |use current image file for layout and background image

as I already have Science magazine cover loaded.

Edit Images (add or edit images) | click Add Image and select the ice cream photo with a white background.

0.3 for the scale of the image. You can adjust the size this way. 1.0 is the actual size.

0.1 Base Transparency as I want it to blend in just a tad. 50% would be 0.5.

Click Var. Transparency Paint and you can adjust the Radius (size of circle) to paint to make it disappear. Once I finish painting transparency to the remaining white area it'll be complete.

I can add text by clicking Edit Text
To combine two or more pdfs together
pdftk first.pdf second.pdf output combined.pdf

or open first.pdf up with PDF Arranger or PDF Slicer and click + to Add second.pdf and choose Save As and name it combined.pdf
sudo apt install ncdu

ncdu lets you browse directories with arrow keys and ENTER key and figure out which ones are taking up the most space on a hard drive. ncdu from the directory or for your home directory ncdu ~

d
key will let you delete the directory
now to delete that hidden .kodi directory which I deleted awhile back.

Also I was able to find out argos-translate is 5.2GiB installed and the cache is 4.4GiB..wow. Telegram Desktop cache is 3.9GiB
Czkawka can quickly search for duplicate files (took about 10 to 15 mins for me), big files (only 20 seconds) . Just download appimage.
LosslessCut export options. Merge all cuts together into one single video file. Keyframe is better if you don't need a frame by frame cut. Shift timestamps (make_zero) is important as it resets all segements to new time codes. If the original video isn't already optimized to x265 or just bloated then re-encode the merged video file in videomass.
Simon Tatham's Portable Puzzle Collection showing my favorite puzzles
Simon Tatham's Portable Puzzle Collection

Love logical puzzles. Great free puzzle collection.

https://www.chiark.greenend.org.uk/~sgtatham/puzzles/

Install on Linux Mint
sudo apt install sgt-puzzles

eyefoam ($free) https://hewgill.com/puzzles/
Simon Tatham's Portable Puzzle Collection

These are my favorite puzzle games in this collection which can be played online in your browser (javascript). I link to Nikoli (started in 1980) so you can see the original Japanese game it's based off of.

You can just hit SOLVE to see what the objective is and quickly read the rules.

Bridges, bridge-placing puzzle
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/bridges.html

https://www.nikoli.co.jp/en/puzzles/hashiwokakero/

Galaxies
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/galaxies.html

https://www.nikoli.co.jp/en/puzzles/tentai_show/

Keen, arithmetic Latin square puzzle aka KenKen
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/keen.html

Light Up, light-bulb placing puzzle
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/lightup.html

https://www.nikoli.co.jp/en/puzzles/akari/

Loopy, loop-drawing puzzle
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/loopy.html

https://www.nikoli.co.jp/en/puzzles/slitherlink/

Net, network jigsaw puzzle
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/net.html

Pearl, loop-drawing puzzle
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/pearl.html

https://www.nikoli.co.jp/en/puzzles/masyu/

Rectangles
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/rect.html

https://www.nikoli.co.jp/en/puzzles/shikaku/

Solo, number placement puzzle aka Sudoku
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/solo.html

https://www.nikoli.co.jp/en/puzzles/sudoku/

Tents, tent-placing puzzle with trees
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/tents.html

Unequal aka Futoshiki
https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/unequal.html
For those on eyefoam or android there is a logical puzzle app I recommend. Free with banners / ads or ($7 to disable ads. I don't play that often so haven't paid).

100 Logic Games - Time Killers (also have volume 2 and 3 but don't recommend those just the first one)

These are my favorite puzzles from the game app.

Parks
Battle Ships
Thermometers
Hidoku
Hidden Stars

Nurikabe
https://www.nikoli.co.jp/en/puzzles/nurikabe/

Hitori
https://www.nikoli.co.jp/en/puzzles/hitori/

NumberLink
https://www.nikoli.co.jp/en/puzzles/numberlink/

Kakuro
https://www.nikoli.co.jp/en/puzzles/kakuro/