Height (in cm)
Weight (in kg)
Height (in cm)
Weight (in kg)
One database
mysqldump -u root -p --opt [database name] > [database name].sql
Or all databases:
mysqldump -u root -p --opt --all-databases > [database name].sql
mysql -u root -p newdatabase < /path/to/newdatabase.sql
# or to import multiple databases:
mysql -u root -p < /path/to/newdatabase.sql
# if root does not have a password:
mysql -u root newdatabase < /path/to/newdatabase.sql
Here are the details: https://pbpython.com/notebook-alternative.html
All in one native app for Mac, Jupiter replacement.
CMS | Content Organisation | Links to other posts | Features |
Pico | page_name.md OR page_name/index.md | [link](%base_url%/blog/page_name) | |
Yelow | page_name/page.md numeric_prefix-page_name.md | [link](page_name) | Search Tags |
Grav | page_name/theme_name.md | [link](../page_name) | Search Tags Sidebar |
HTMLy | Search Categories Tags Online Editor |
Backup files:
cp -r /var/www/techblog.dudan.ru /var/www/techblog.dudan.ru.backup
Download latest WordPress archive and unzip it:
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
Sync new files to the the web site folder:
rsync -avh --progress wordpress/ techblog.dudan.ru/
Install wp-cli:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
Run update:
wp core update --path=/var/www/techblog.dudan.ru
/ip firewall filter
add action=accept chain=forward dst-port=80 in-interface=ether1 protocol=tcp comment="allow requests to port 80 to be forwarded (to web server)"
Repeat for port 443 if needed
/ip firewall nat add chain=dstnat in-interface=ether1 protocol=tcp dst-port=80 action=dst-nat to-addresses=192.168.0.9 to-ports=80 comment="forward from wan to web server port 80"
Do the same for 443 port if needed
/ip firewall nat
add chain=srcnat src-address=192.168.0.0/24 dst-address=192.168.0.9 protocol=tcp dst-port=80 out-interface=ether1 action=masquerade
Do the same for 443 port if needed
Исходные данные: есть 2 маршрутизатора, обеспечивающие доступ в интернет для двух отдельных локальных сетей. Например между 2мя офисами:
Задача: обеспечить связь локальных сетей так, чтобы из одной сети можно было “дозвониться” до клиентов другой сети.
Включить L2TP сервер
/interface l2tp-server server set enabled=yes
Добавить PPP профиль, который будет использоваться в свойствах учетной записи:
/ppp profile add name=l2tp-bridge only-one=yes use-encryption=yes
Добавим учетную запись:
/ppp secret add name=office2 password=yourpassword local-address=192.168.20.1 remote-address=192.168.20.2 service=l2tp profile=l2tp-bridge
Local-address – это адрес, назначается серверу, а remote-address клиенту. Примечание: адреса должны быть в подсети отличной от LAN1 и LAN2
Создадим интерфейс:
/interface l2tp-server add name=l2tp-in-office2 user=office2
/interface l2tp-client add name=l2tp-out-office1 connect-to=<IP address> user=office2 password=yourpassword allow=mschap2 disabled=no
Они нужны для того, чтобы клиенты одной сети могли обращаться к клиентам другой сети.
На первом маршрутизаторе:
/ip route add dst-address=192.168.2.0/24 gateway=192.168.20.2 pref-src=192.168.0.1
На втором:
/ip route add dst-address=192.168.0.0/24 gateway=192.168.20.1 pref-src=192.168.2.1
Main causes of low responsiveness are:
Tune your swappiness and cache pressure settings to avoid page faults when using your foreground applications. It’s a trade-off of performance vs responsiness.
Install The Great Suspender for Chromiun to reduce RAM usage. Or Auto Tab Discard for Firefox. This will reduce the need to use swap. Or (surprise-surprise) buy more RAM.
Use iotop to see if there are processes eating the IO.
Install the Linux-Zen or Liquorix kernels (depending on your distro) to have access to the better MuQSS process scheduler and BFQ I/O schedulers. If you’re using an SSD you will want to check if you’re using NOOP or Deadline I/O schedulers instead. Also check for TRIM support.
Reduce priority of processes like Dropbox and Tracker (configure them to only run when you are not using the system). It can be done using Ananicy.
Use htop to see if there processes competing for processor time
https://www.akitaonrails.com/2017/01/17/optimizing-linux-for-slow-computers
https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170
Fix permissions
chown -R www-data:www-data /var/www/nextcloud
Scan for file changes
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
For anyone having issues with files getting lock while using redis on nextcloud pi. Specially while syncing nodejs apps…
ffmpeg -i input.avi output.mp4 # Default H.264 codec
ffmpeg -i input.avi -c:v libx265 -c:a aac output.mp4 # Encode video with HEVC and audio with AAC:
FFmpeg options:
-c:a copy # copy audio without re-encoding
-c:a aac # convert audio to AAC
-c:v libaom-av1 # video in AV format
-qscale:v N # Video Quality: N = 1..31 (1 is highest quality)
-qscale:v N # Audio Quality: N = 1..31 (1 is highest quality)
-strict -2 # turn on experimental features
Convert entire folder to MP4
for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done
Convert AVI to MP4 – folder with sub-directories:
find . -name "*.avi" -exec sh -c 'f="{}"; ffmpeg -i "$f" "${f%.avi}.mp4"' \;
https://unix.stackexchange.com/questions/35746/encode-with-ffmpeg-using-avi-to-mp4