Source: https://github.com/SynoCommunity/spksrc/wiki/Synology-Used-Ports
Application/Service | Protocol | Port |
---|---|---|
FTP | TCP | 20, 21, 55536, 55537 |
SSH | TCP | 22 |
Telnet | TCP | 23 |
SMTP | TCP | 25 |
DNS | Both | 53 |
DHCP | UDP | 67-68 |
<?php | |
# Sometimes, you need to disable Wordpress updates because you prefer to update your Dockerfile or Helm chart. | |
# Source : https://wordpress.org/support/article/configuring-automatic-background-updates/ | |
# function.php or a custom plugin | |
add_filter( 'automatic_updater_disabled', '__return_true' ); | |
add_filter( 'auto_update_core', '__return_true' ); | |
add_filter( 'auto_update_translation', '__return_false' ); | |
add_filter( 'auto_core_update_send_email', '__return_false' ); |
Source: https://github.com/SynoCommunity/spksrc/wiki/Synology-Used-Ports
Application/Service | Protocol | Port |
---|---|---|
FTP | TCP | 20, 21, 55536, 55537 |
SSH | TCP | 22 |
Telnet | TCP | 23 |
SMTP | TCP | 25 |
DNS | Both | 53 |
DHCP | UDP | 67-68 |
For macOS, the date
utility doesn't give the right information. You need to install GNU date utility.
brew install coreutils
Homebrew will install the utility as gdate
instead of date
, which leaves the original date untouched and available.
gdate
has an --iso-8601
option available, but it doesn't give a format that strictly follows the ISO 8601 standard, as far as I can determine. I find it better to explicitly state the format with:
# https://explainshell.com/explain?cmd=find+-E+.+-regex+%27.*%2F%5B%5E%2F%5D%7B43%2C%7D%27 | |
find -E . -regex '.*/[^/]{42,}' | |
# Common problem faced when you need to copy files to an encrypted volume. | |
# You could also create a ZIP of your files and save it into the encrypted volume. | |
# Or, you could just create another volume into this encrypted volume. |
function uuidv4() { | |
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => | |
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) | |
) | |
} |
#!/bin/sh | |
for file in *.vue; do | |
cat prepend.txt $file >> $file.$$ | |
mv $file.$$ $file | |
done | |
for file in *.vue; do | |
cat $file append.txt >> $file.$$ | |
mv $file.$$ $file | |
done |
# https://explainshell.com/explain?cmd=for+file+in+.%2F**%2F**.%7Bpng%2Cjpg%2Cico%2Csvg%7D%3B+do+convert+%22%24file%22+-fill+black+-draw+%27color+0%2C0+reset%27+%22%24file%22%3B+printf+%27.%27%3B+done | |
for file in ./**/**.{png,jpg,ico,svg}; do convert "$file" -fill black -draw 'color 0,0 reset' "$file"; printf '.'; done |
// Execute this in the console of on your own playlist | |
var videos = document.querySelectorAll('.yt-simple-endpoint.style-scope.ytd-playlist-video-renderer'); | |
var r = []; | |
var json = []; | |
r.forEach.call(videos, function(video) { | |
var url = 'https://www.youtube.com' + video.getAttribute('href'); | |
url = url.split('&list=WL&index='); | |
url = url[0]; |
#!/bin/bash | |
# Reset a wordpress | |
# sudo sh reset_wordpress.sh website_name database_name /path/to/document/root/ | |
# TODO | |
# - Add some user input tests | |
# - Add some FS tests | |
NAME=$1 | |
DBNAME=$2 |