Posts Tagged ‘ Новости

Ansible Error: template error while templating string: Encountered unknown tag ‘do’

Just add to ansible.cfg module jinja2.ext.do

[defaults]

# some basic default values...

jinja2_extensions=jinja2.ext.do

Lihgthouse on Debian

Install latest Chrome

apt-get install xvfb imagemagick
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb

install NodeJS and NPM

apt install nodejs
apt install npm
nodejs -v

Install Lighthouse

npm install -g lighthouse

Run test

lighthouse https://reverse.org.ua --chrome-flags="--no-sandbox --headless --disable-gpu"

Scripts for streaming desktop

ffmpeg \
   -video_size 1920x1080 -framerate 60 \
  -f x11grab -i :0.0+100,200 \
  -f alsa -i default \
  -f webm -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm \
  -c:a libvorbis -b:a 96K \
  -c:v libvpx -b:v 1.5M -crf 30 -g 150 -deadline good -threads 4 \
  icecast://source:hackme@localhost:8754/stream.webm

# http://localhost:8754/stream.webm

Source – https://gitlab.com/guoyunhe/plasma-cast/blob/master/stream.sh

After you can use – https://github.com/balloob/pychromecast/

Zookeeper RPM for Centos 7

You can download rpm for version 3.4.14 from url zookeeper-3.4.14-1.x86_64.rpm

It created from original binary from Apache Org

Used: https://github.com/id/zookeeper-el7-rpm

Centos 8 – update linux kernel

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

dnf install https://www.elrepo.org/elrepo-release-8.0-2.el8.elrepo.noarch.rpm

So, install the new kernel.

:~# dnf --enablerepo=elrepo-kernel install kernel-ml

Setup new Kernel to default

grub2-set-default 0

grub2-mkconfig -o /boot/grub2/grub.cfg

Syncthing: How to add Relay Server URI

In the docs it says that it’s one of the listen addresses now
Thanks. It works to put URI in of config.xml.
URI like : relay://:22067/?id=EGIGXJZ-F7UOIQ2-KSYNJEB-XILHWP5-TKKIVLE-U……

Java8 in Debian

For starting we need install add-apt-repository

apt-get install software-properties-common python-software-properties

Then install java8

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

To automatically set up the Java 8 environment variables:

sudo apt-get install oracle-java8-set-default

or

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer

Syncthing

Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it’s transmitted over the Internet.

Нада потестити…..

Запуск VNC сервера через SSH

На клиентской стороне:

ssh 10.10.10.1 -L 5900:localhost:5900 "x11vnc -display :0 -noxdamage"

После чего в VNC клиенте подключаемся к localhost:5900

Mysql: duplicating a table

You need to do :

CREATE TABLE newtable LIKE oldtable; 
INSERT newtable SELECT * FROM oldtable;

This creates copy of existing Mysql table with indexes

Weathermap wont delete link

If you can’t delete link in editor make ine change in file editor.php

diff editor.php editor.php.old 
794c794
< 		if(isset($map->links[$target])) {
---
> 		if(isset($map->links[target])) {