stackoverflow not opening in firefox

For some reason still unknown to me, stack overflow was not opening on my machine !

Not sure if the issue is cloudflare which seems to relevant to stackoverflow

It started opening when i went into settings (about:config), then disabled network.http.http3.enable then opened the website, then re-enabled it, still waiting for it to stop working again for further investigation, but for now, it is working just fine

LineageOS for my J500H phone

This phone is so old and low on storage space, that if it is left to connect to the internet, the storage fills up completely before you get the chance to disable updates !

I have moved to external storage before, but as you might expect, this would have been a great solution if i had slightly more space on the device itself (Original post here)

For development purposes, I would like this phone to have as low an android version as possible, and the lowest android version of LiniageOS itself is 6 (Marshmallow)

CyanogenMod, the name of LiniageOS before Nougat, but it overlaps with LiniageOS at Android version 6, although Android 5 on the phone would have been more useful for my development endeavors, I decided to go with Android 6 anyways. Which happens to be LiniageOS 13.

The best file managers for Android

There is no shortage of file managers for android, both free and paid

The popular Paid file managers are

  • MiXplorer = Paid, no trial, plugins to add functionality
  • Solid Explorer = 14 Day trial, during trial, you get ads (Root explorer, archiver, Chromecast, File categorization) + Local + FTP, LAN, sFTP, WebDav, NextCloud, etc…..
  • File Commander = 7 Day Trial, during trial there are ads, FTP, LAN, cloud providers, etc…

Free and open source

  • Material Files = Simple file manager, but well done in terms of design and good android development practices, Open source mostly written in kotlin (Github =>)
  • Amaze File Manager = Simple material design file manager, written in both Java and Kotlin (Github =>)
  • NextCloud Android client = Works with the self hosted Next Cloud (But so do unofficial managers) (Github =>)

Free but not open source

  • File Manager by Xiaomi = Has network options (LAN, FTP)
  • Google Files = Basic, supports Google Drive and OneDrive, google drive launches the drive app

HP officejet 7740 Linux drivers

For this printer to work, you will need to install HPLIP

before you do, I would recommend you install the following packages

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
sudo apt install python3-numpy
sudo apt install python3-scipy
sudo apt install python3-pypdf2
sudo apt install python3-opencv
sudo apt install ocrmypdf
sudo apt install python3-skimage
sudo apt-get install libleptonica-dev
sudo apt-get install tesseract-ocr
sudo apt-get install libtesseract-dev
sudo apt-get install qpdf
sudo apt install policykit

once done, run the file ./hplip-3.24.4.run

DVD VOB files to MP4 with FFMPEG

Let us start by analyzing our input files and what we expect to find

  • A video stream, the obvious
  • Audio streams for different languages
  • Audio streams that should play together
  • dvd_subtitle

dvd_subtitle

Let us start with the subtitles, the encoder/decoder for dvd_subtitle stream is either dvdsub or dvbsub.

According to documentation, This codec decodes the bitmap subtitles used in DVDs; the same subtitles can also be found in VobSub file pairs and in some Matroska files.

Metroska uses VobSub, vobsub is basically the same as the stream in DVD but in a file with the extension “*.sub”.

So, I have a stream with “dvd_subtitle” on stream 0:3, to extract, I will probably use a command such as

Extracting the subtitle files

ffmpeg -i input.VOB -c copy -map 0:3 subtitles.sub

Now, at this stage, if you want to convert them to srt for example (Or a text base subtitle system), you will need to use a tool that has OCR !! Such a tool is VobSub2SRT =>

Another method after extracting is using an online service such as this one (https://subtitletools.com/convert-to-srt-online) to turn subtitles into SRT

The “new” => “text document” went missing

On windows 11, the document type I create the most through right click / new menu is the text document, Today, i click in a folder, and it is missing, and in its place was a bunch of open office document types !

Turns out to bring it back I have to put the following text in a .reg file and run it, then restart explorer or windows

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.txt\ShellNew]
"ItemName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,2c,00,2d,00,34,00,37,00,30,00,00,00
"NullFile"=""

[HKEY_CLASSES_ROOT\txtfilelegacy]
@="Text Document"

But now since I am here, I want to also add a new => html file to that very menu

1- Create a file called (template.html) ideally you would want to save it in %Allusersprofile%\Templates, in my case the explicit location would be “C:\ProgramData\Templates”, but you will probably get an access denied error, to spare you the hassle of working around that, you can simply create a new folder inside C:\ProgramData\ called ExtraTemplates and store the file there

Now, put the following in a reg file and run it

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.html\ShellNew]
"FileName"="%Allusersprofile%\ExtraTemplates\html.html"

Enjoy

Windows classic right click menu

re-enabling the old pre windows 11 context menu (Mouse right click menu) is as simple as running the following command in your terminal

reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve

You obviously need to restart explorer, or your PC after this, but there is nothing more to it, short and simple

In windows 11 the complete context menu is available through the “show more options” option in the new menu, the new menu is a subset of the old, so why not have the old pop up from the word go

Enjoy your windows 11 with a windows 10 like context menu 😉

Cool Artificial intelligence tools

Transcribe Audio

Local

Online

  • Turboscribe: https://turboscribe.ai
    Tried to feed it a file with 2 people, one speaking with a Jordanian accent, and another with a Saudi accent, the results were 8/10, the system seems to allow 3 files 30 minutes each for free users.

Text To Speech

Local

Tortoise and Bark for Voice Synthesis

Find in files and replace in files in Linux

If you are looking for functionality similar to notepad++ functionality of replacing a string in all the files in a certain folder, Look no more, in linux this is a simple command

Assuming you are on the command line and the directory containing the files is the active one (cd)

the following line will replace foo with bar in all files on the current root directory but not in subdirectories

sed -i -- 's/foo/bar/g' *

If you want it to go recursively into sub directories, you can combine the above with the find command

 find . -type f -exec sed -i 's/foo/bar/g' {} +

if you want sed to backup the files before it does the replace, use the following command, you can replace the .bak with anything you like

sed -i.bak -- 's/foo/bar/g' *

SD cards trim command

Many modern SD cards support the trim command () in Linux, the problem is that not many SD card readers (Mostly USB) do

So running () on a mounted card will usually return an error such as

fstrim -v /hds/usb
fstrim: /hds/usb: the discard operation is not supported

The command “lsblk –discard /dev/sdf” should tell you whether your SD card/adapter combination support trim right now, so the failure of the fstrim command above can be predicted in advance with this command

Now, assuming your SD card is not mounted, and you need to format it, Will formatting restore the speed ? unfortunately not, to restore the speed, before formatting your SD card, you might want to run the blkdiscard function, mind you, this command will delete all your data !

blkdiscard -f /dev/sdf

but even that might not work

blkdiscard: Operation forced, data will be lost!
blkdiscard: /dev/sdf: BLKDISCARD ioctl failed: Operation not supported