You can use this code:
find: <h2>(.*?)</h2>
replace: <h2>\L\1\E</h2>
where \L means lowercase (begin) and \E means end (of transformation)
a thoughtful use of digital
You can use this code:
find: <h2>(.*?)</h2>
replace: <h2>\L\1\E</h2>
where \L means lowercase (begin) and \E means end (of transformation)
In you have linux, flatpack installation of copyq can solve many possible problems, but it has also some disadvantage.
The best choice, then, is to install copyq according to its website:
Ubuntu and Debian users can add the official PPA:
sudo add-apt-repository ppa:hluk/copyq
sudo apt update && sudo apt install copyq
In same cases it could be not enough the above code. Then you can try with something like:
QT_QPA_PLATFORM=xcb copyq
You can set permanently in KDE menu with a config like in the below image

To set a variable, such as an url, you can use the following steps:
require_once ABSPATH . 'wp-settings.php';
/** variabili */
define('GLOSSARIO_URL', 'yourwebsite/glossario.php');
define('GLOSSARIO_URL', 'yourwebsite/glossario.php');
function glossario_link($atts) {
$atts = shortcode_atts([
'id' => '',
'testo' => ''
], $atts);
$url = GLOSSARIO_URL . '#' . $atts['id'];
return '<a href="' . esc_url($url) . '">' . esc_html($atts['testo']) . '</a>';
}
add_shortcode('glossario', 'glossario_link');
[glossario id="universalismo" testo="universalisticamente"]
where the content of testo="" is what will appears in your wp page (while in the editor you will see that code)
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:
Many 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:
Other apps were once good, but now are discontinued, such as
I have TB in american english, but I hate american english date format (mm/dd).
To fix this ugly, terrible, disgusting way to show dates, I tried unsuccessfully to:
The only way, then, seemed to set whole TB in Italian (or in an other not-english language that has dd/mm).
But there is a real possibility: use en-GB instead of en-US: and so you have both, english and dd/mm as date format.
If you use Wayland and in taskbar TB has an ugly W icon, you can try
StartupWMClass=thunderbird-esr. Instead of thunderbird-esr you could have to check the appropiate name of TB in yout system.Today happened that mariadb worked almost correctly, but two wordpress db were incorrectly managed. Indeed I could modify a post, but I couldn’t add a new one.
In another PC I, luckily, had the good wp db (perfectlty working with its innodb). So, it was possible to fix this problem. With the following steps:
a) in the well working device dump (from a teminal) the working wp db:
mysqldump -u root -p --single-transaction --routines --triggers your-db-name > dump-yourdbname.sql
b) in the bad working device
mysql -u root -p (of course you have to provide your mysql psw)Now all should work 🙂.
If you want keep an external markdown file and include it in a WordPress page, you can follow these steps:
// per markdown BEGIN
function carica_md_block() {
wp_enqueue_script(
'md-block',
get_stylesheet_directory_uri() . '/js/md-block.js',
array(),
null,
true
);
}
add_action('wp_enqueue_scripts', 'carica_md_block');
add_filter('script_loader_tag', function($tag, $handle, $src) {
if ($handle === 'md-block') {
return '<script type="module" src="' . esc_url($src) . '"></script>';
}
return $tag;
}, 10, 3);
function shortcode_scheda_md($atts) {
$atts = shortcode_atts(array(
'file' => ''
), $atts);
$file = basename($atts['file']);
if (empty($file) || pathinfo($file, PATHINFO_EXTENSION) !== 'md') {
return '';
}
$url = content_url('/uploads/some-path/' . rawurlencode($file));
return '<md-block src="' . esc_url($url) . '"></md-block>';
}
add_shortcode('scheda_md', 'shortcode_scheda_md');
// per markdown END
/uploads/some-path/ . Note that the folder some-path could be a symlinked one, from your local PC.[scheda_md file="the-name-of-the-file.md"], [scheda_md]the-name-of-the-file.md[/scheda_md]/some-path/ folder.../ to the target pathIf you have to add the same property, i.g. ../ to several symlinks in the same folder, you can use this code:
#!/bin/bash
for f in *; do
[ -L "$f" ] || continue
[ -e "$f" ] && continue # skip the valid ones
target=$(readlink "$f")
[[ "$target" != /* ]] && ln -snf ../"$target" "$f"
done
You can either save this code in a bash file, or paste it directly in a terminal.
If you have now target files renamed with “-” instead of space ” “, you can use this code:
for f in *; do
[ -L "$f" ] || continue
[ -e "$f" ] && continue
target=$(readlink "$f")
newtarget=${target// /-}
[[ "$target" != "$newtarget" ]] && ln -snf "$newtarget" "$f"
done
An useful wp plugin is wp users that allow you to collect subscriptions from the readers of your blog.
It has add-ons such as captcha that, linked with Google captcha, allow you to select humans from robots (and spam).
Be careful however to set v2 rather than v3, both in Google and in your wp plugin settings, otherwise you couldn’t be more able to login.