LaTeX journal

For a long time, i’ve been writing my personal journal. Here’s LaTeXified way of doing it: mkdir dear_diary && cd dear_diary mkdir output git init bash script “edit.sh”: theMonth=$(LC_ALL=en_US.utf8 date +%b) theYear=$(LC_ALL=en_US.utf8 date +%Y) theDay=$(LC_ALL=en_US.utf8 date +%d) mkdir -p $theYear/$theMonth vim $theYear/$theMonth/$theDay.tex git add ./* git commit -a -m "$theDay.$theMonth.$theYear" pdflatex -synctex=1 -interaction=nonstopmode -output-directory=output main.tex > /dev/null main.tex: **the \usepackage in my blog is broken by markdown. Link to github right under the code ** ...

2020-01-17 · 1 min · EK

KVM VM console access

Access guest console from host via virsh console <domain-name> Run this on guest (debian, ubuntu) systemctl enable [email protected] systemctl start [email protected] The exit keystroke is ctrl+5.

2020-01-05 · 1 min · EK

RouterOS self-signed HTTPS certificate

Enable WWW-SSL on Mikrotik RouterOS ssh 172.30.10.1 /certificate add name=SSL common-name=SSL key-size=2048 /certificate create-certificate-request template=SSL key-passphrase=CertPassword123 /quit sftp 172.30.10.1 lmkdir mikrotik-certs lcd mikrotik-certs get certificate* exit cd mikrotik-certs openssl rsa -in certificate-request_key.pem -text > certificate-request2.pem openssl x509 -req -days 99999 -in certificate-request.pem -signkey certificate-request2.pem -out mikrotik_ssl.crt sftp 172.30.10.1 lcd mikrotik-certs put mikrotik_ssl.crt put certificate-request2.pem exit ssh 172.30.10.1 /certificate import file-name=mikrotik_ssl.crt /certificate import file-name=certificate-request2.pem /certificate print /ip service enable www-ssl /ip service set www-ssl certificate=mikrotik_ssl_.crt_0 /quit exit

2019-12-27 · 1 min · EK

Simple TFTP setup

sudo su apt-get install xinetd tftpd tftp vim /etc/xinetd.d/tftp service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftp disable = no } mkdir /tftp chmod -R 777 /tftp chown -R nobody /tftp service xinetd restart

2019-09-07 · 1 min · EK

Baikal DAV

http://sabre.io/baikal/install/ wget https://github.com/sabre-io/Baikal/releases/download/0.6.0/baikal-0.6.0.zip unzip baikal-0.6.0.zip mv baikal /var/www/html cd /var/www/html chown -fR www-data:www-data baikal apt-get install nginx php7.3 php7.3-sqlite php-sabre-dav NginX vhost: server { listen 80; server_name default_server; root /var/www/html/baikal; index index.php; rewrite ^/.well-known/caldav /dav.php redirect; rewrite ^/.well-known/carddav /dav.php redirect; charset utf-8; location ~ /(\.ht|Core|Specific) { deny all; return 404; } location ~ ^(.+\.php)(.*)$ { try_files $fastcgi_script_name =404; include /etc/nginx/fastcgi_params; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } } Nginx proxy with configured upstream: ...

2019-09-03 · 1 min · EK