Markdown editors

gabbia

As already said, 3 years ago, there are very few md editors really good. Recently I tried if there are alternatives to zettlr, but unsuccessfully.

Zettlr is a very good md editor, open source and customizable, WYSIWYG but respectful of your control of code. Its mayor limit is that cannot recognize symlinks.

Typora has almost all the pros of Zettlr (except the automatic replacement of “), and can recognize symlinks, but it’s not open source.

MdSilo is not too bad: wysing, open source, can open symlinked files. A bit elementar, no much customizable.
MarkFlowy seems very good. Very interesting. Open source, it can read symlinks, and is more customizable than MdSilo, even less than Zettlr. But some doubts about its respect of your privacy (its auth certificate was seen as malicious by Firefox).

Other md editors are far worse:

gabbiaMany of them don’t allow you to open not only symlinked files, but any existing external file. Moreover many they ask you for your e-mail. In a nutshell: a golden cage.

Golden cages are:

  • TriliumNotes-(v0.103.0)
  • Logseq-(0.10.15)
  • Siyuan-3.6.5
  • Beaver-Notes-4.4.0

Other apps were once good, but now are discontinued, such as

  • marktext
  • apricotine
  • remarkable

The Markdown benefits

The Markdown format It is a format that guarantees the maximum of graphic rendering with the minimum of code. Why is this important?

A rich graphic rendering, on the one hand, is a value because the things that are written (and then they must be correctly readable) do not all have the same importance. And, on the other hand, the minimal use of the code helps to reduce the size of the file, occupying as little space as possible on the device. Moreover, Markdown helps also to modify directly and easily the code, since it is an extremely “clean” code and very similar to its graphic rendering.

titles

A title must hit more than the body of the text. And a main title must hit more than secondary titles. A way to do this is a different size of characters. Markdown can do this.

the TOC

The use of titles is also useful for “browsing” quickly in a document, jumping from one title to another, without having to flow the whole body of the text. A good text viewer is able to provide a TOC (Table of Content) which allows you to browse quickly between the parts of the document (characterized by higher or lesser level titles).

text formatting

But the body of the text is also important to highlight what is most important from what is less: bold and italics are ways to do it.

blockquotes

Then it is good to be able to distinguish between what the author of the document and the blocks of text said by other authors (i.e. long citations) writes, and for this there is the blockquote, which is good is also graphically distinct from the rest of the body of the text.

Syncing MS Outlook and Thunderbird

There could be synchronization problems between Thunderbird and the webmail of MS Outlook.

A good, complete guide is here. Because a fault in syncro can be due to the lack of “subscription”, the most important thing is to subscribe all you folders you need to see in TB:

  • right mouse on the account
  • -> subscribe
  • choose what folders subscribe

Like in this screenshot:

Replacing Autokey in Wayland

Many Linux distros are leaving xorg (x11) for Wayland, as display server protocol. Unfortunately not all the applications are ready for Wayland.

In particular Autokey, a very useful application to expand text and automatize typing operations, is not (yet) compatible with Wayland.

A quite good replacement of Autokey is Espanso. But there are also some limitations:

  • Espanso has big problems in LibreWriter (abbreviations are often expanded with errors). Similar problems there were also with Autokey in LibreWriter, but Autokey was able to provide some workarounds.
  • Espanso, unlike Autokey, can provide a very small range of hotkeys (such as ctrl + alt + d): Espanso can use only hotkeys with ctrl (not with alt or shift) and a few letters. I.g. “x01” means “ctrl + a”. You can find the whole range of possible combinations here.

However, as long as the main typing operations are in LibreWriter, or Kate, you can use that applications possibilities to expand text.

in LibreWriter there are at least two possibilities (to expand an abbreviation):

  • tools – > autocorrect
  • tools -> autotext

In Kate you can use snippets to create something similar to Autokey.

I.g. to create a snippet to wrap selected text with the tag <h1>, you can add this code as snippet code:

${rangeCommand("<h1>%%1</h1>", "title")}

Choose the title as you prefer (obviously without spaces), and a key combination, i.g. ctrl+1.

Don’t forget to add, in the javascript section (the tab scripts) this code

function rangeCommand(command, def) {
    if (view.selectedText().length > 0) {
        return command.replace("%%1", view.selectedText());
    } else {
        return command.replace("%%1", def);
    }
}

In this way, you will be able to add a title <h1> to your selected text.

Verify a KDE-Neon iso with a sig file

You have first of all to install the public-key of KDE-Neon:

  • downloading it (it is a text file such as armored-keys.asc)
  • and installing it gpg –import [your-downloaded-public-key-file]

Then you have to go into the folder where are both iso and sig files and give this command

gpg --verify [your-iso-file-name].iso.sig

You should see something like:

gpg: assuming signed data in 'neon-user-20200813-1119.iso'
gpg: Signature made �� 16:40:21 PKT �� 13 �������� 2020
gpg:                using RSA key 348C8651206633FD983A8FC4DEACEA00075E1D76
gpg: Good signature from "KDE neon ISO Signing Key <neon@kde.org>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 348C 8651 2066 33FD 983A  8FC4 DEAC EA00 075E 1D76

Here more.

How to switch a php variable according to the server address

I managed to switch my websites links (containing a php variable: $root) according to the server address. If they are in localhost the variable begins with: http://localhost , if they are on remote the variable is the remote address.

The php code is quite simple:

if ($_SERVER['SERVER_NAME'] == "localhost")
{$root_yourwebsiteA = "http://localhost/your path/yourwebsiteA/";
 $root_yourwebsiteB = "http://localhost/your path/yourwebsiteB/";
 $root_yourwebsiteC = "http://localhost/your path/yourwebsiteC/";
}
else 
{$root_yourwebsiteA = "http://remote path/yourwebsiteA/";
 $root_yourwebsiteB = "http://remote path/yourwebsiteB/";
 $root_yourwebsiteC = "http://remote path/yourwebsiteC/";
}

embed a div from another page

The way with less code is a jquery script. Like the following:

<p id="new"></p>

<script>
$( "#new" ).load( "/your-path/your-file.php #your-div" );
</script>

The only security limit is that you cannot use an absolute path, beginning with https:// .

But you can use a php variable to set your javascript value so that it may be available from any folder (sub-folder) of your website. See here how to pass a php variable to javascript.

permission denied

If you get rhis error message even you have all the rights, probably you are trying to run the command on a mounted partition that had the “noexec” flag on.
So change partition, .f.e. try your /home.

avidemux too slow

It’s better use (one of) the following codecs for encoding

  • x264
  • libavcodec MPEG-1/MPEG-2
  • libavcodec MPEG-4
  • Xvid 

so Avidemux will be able to optizmize the CPU usage and will be much faster. And the CPU temperature will be lower.
Cfr.here.