Просмотрено
Рубрика: Linux & Unix

QRencode

QRencode

Забавна программа якщо треба перенести якийсь текст на телефон, а під рукою нема ніяких штатних месенджерів echo "text_string" | qrencode -t UTF8 -o – █████████████████████████████ █████████████████████████████ ████ ▄▄▄▄▄ █▀▄█▀▄█ ▄▄▄▄▄ ████ ████ █ █ █▀▄█▀██ █ █ ████ ████ █▄▄▄█ █▀▀ ▄ █ █▄▄▄█ ████ ████▄▄▄▄▄▄▄█▄█ ▀ █▄▄▄▄▄▄▄████ ████ ▄▄▄ ▀▄▄ ██ ▄█▄▀ ▀▄▀████ █████▀▄▄▄█▄█▀█▀▄█▀▄▀█ ▄█████ ████▄▄▄▄█▄▄▄ ▀▄▄▀█ █▀▄█ ▀████ ████ ▄▄▄▄▄ █▄ ▄█▄ ██▀▀ ▄█████ ████ █ █ █ ▄ █▀▀ ▄▀ ▀▄▄████ ████ █▄▄▄█ █ ▄▀▀▄▀▄█▀▀ ██████ ████▄▄▄▄▄▄▄█▄▄█▄▄█▄█▄▄▄▄█████…

Читать далее Читать далее

SSH client stuck on connect

SSH client stuck on connect

This is probably an issue with D-Bus and systemd. If the dbus service is restarted for some reason, you will also need to restart systemd-logind restart systemd-logind service: systemctl restart systemd-logindsystemctl restart systemd-logind I had this same issue on CentOS 7, because the messagebus was restarted (which is how the D-Bus service is called on CentOS).

Linux bridge: MAC addresses and dynamic ports

Linux bridge: MAC addresses and dynamic ports

Scenario: KVM virtualization host running several bridged guests. The host has a bridge interface br0 that starts out containing only eth0, and other interfaces are dynamically added and removed from the bridge as guests are started and stopped. The problem is, the host seems to randomly suffer some loss of connectivity (from a few to 30-40 seconds) when some guest is started or stopped. Initially one might think of something related to STP, but it turns out that it is…

Читать далее Читать далее

Mysql: wrong slave_master_info after upgrade to 5.7

Mysql: wrong slave_master_info after upgrade to 5.7

After upgrade mysql-server from 5.6 to 5.7.10 something strange going on with multimaster replication. When you add more then one channel replication tool not see second channel and server hangs on first channel. This happens because mysql_upgrade tool have a bug. This bug create columns in table slave_master_info in wrong order.

Add CA certifice from Let’s Encrypt to Java 8

Add CA certifice from Let’s Encrypt to Java 8

For add cert to Java 8 you need use keytool cd /tmp/ && \ curl -O https://letsencrypt.org/certs/letsencryptauthorityx1.der && \ sudo $JAVA_HOME/bin/keytool -noprompt -importcert -alias letsencryptauthorityx1 -keystore $JAVA_HOME/jre/lib/security/cacerts -file letsencryptauthorityx1.der -storepass changeit && \ curl -O https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.der && \ sudo $JAVA_HOME/bin/keytool -noprompt -importcert -alias lets-encrypt-x3-cross-signed -keystore $JAVA_HOME/jre/lib/security/cacerts -file lets-encrypt-x3-cross-signed.der -storepass changeitcd /tmp/ && \ curl -O https://letsencrypt.org/certs/letsencryptauthorityx1.der && \ sudo $JAVA_HOME/bin/keytool -noprompt -importcert -alias letsencryptauthorityx1 -keystore $JAVA_HOME/jre/lib/security/cacerts -file letsencryptauthorityx1.der -storepass changeit && \ curl -O https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.der && \ sudo $JAVA_HOME/bin/keytool -noprompt…

Читать далее Читать далее

Syncthing: Debian run script

Syncthing: Debian run script

syncthing Rename syncthing.txt to syncthing Put to /etc/init.d/ Change USER and DAEMON vars chmod 755 /etc/init.d/syncthing chmod 755 /etc/init.d/syncthing To run Syncthing : sudo service syncthing startsudo service syncthing start For autostart sudo update-rc.d syncthing defaultssudo update-rc.d syncthing defaults

Certificate order in Haproxy PEM file

Certificate order in Haproxy PEM file

For SSL in Haproxy you need to create PEM-file and put cert plus private key. But in right order —–BEGIN MY CERTIFICATE—– —–END MY CERTIFICATE—– —–BEGIN INTERMEDIATE CERTIFICATE—– —–END INTERMEDIATE CERTIFICATE—– —–BEGIN INTERMEDIATE CERTIFICATE—– —–END INTERMEDIATE CERTIFICATE—– —–BEGIN ROOT CERTIFICATE—– —–END ROOT CERTIFICATE—– —–BEGIN RSA PRIVATE KEY—– —–END RSA PRIVATE KEY———-BEGIN MY CERTIFICATE—– —–END MY CERTIFICATE—– —–BEGIN INTERMEDIATE CERTIFICATE—– —–END INTERMEDIATE CERTIFICATE—– —–BEGIN INTERMEDIATE CERTIFICATE—– —–END INTERMEDIATE CERTIFICATE—– —–BEGIN ROOT CERTIFICATE—– —–END ROOT CERTIFICATE—– —–BEGIN RSA PRIVATE KEY—– —–END RSA…

Читать далее Читать далее

avconv: simple video converter in Linux

avconv: simple video converter in Linux

If you want convert video from big size to smartphone size use this Libav tool Ubuntu: apt-get install libav-toolsapt-get install libav-tools or Gentoo USE="mp3 speex threads v4l jpeg2k aac amr cpudetection faac opus vdpau x264 webp x265 xvid " CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1" emerge -av libavUSE="mp3 speex threads v4l jpeg2k aac amr cpudetection faac opus vdpau x264 webp x265 xvid " CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1" emerge -av libav and command for convert avconv -i original_video.mkv -b:v…

Читать далее Читать далее

Path MTU Discovery Black Hole

Path MTU Discovery Black Hole

Эта проблема совсем не нова. Она описана в RFC 2923 в 2000 году. Но тем не менее, продолжает встречаться с завидным упорством у многих провайдеров. А ведь именно провайдер виноват в данной ситуации: не нужно блокировать ICMP тип 3 код 4. Причем слушаться «голоса разума» ( т. е. клиентов, понимающих в чем проблема) они обычно не хотят. Решение проблемы с PMTU Не будем звонить в техподдержку, а попробуем решить проблему, исходя из собственных средств. Разработчики Linux, тоже знающие о ней,…

Читать далее Читать далее

Bind9: balancing by client ip (even/odd)

Bind9: balancing by client ip (even/odd)

For some reason i need balancing client’s 50/50 for 2 datacenter’s But, if client send GET request to datacenter1 (DC1) all following request need redirect to the same DC1. Only if DC1 is down – send to DC2 Simplest way – is share client’s by their ip (odd/even) So we need two Bind9 services on one server. First Bind9 will be answered that www.example.org is in DC1, second – in DC2 For example first named.conf: zone "example.com" { type master;…

Читать далее Читать далее