Friday, October 19, 2018

Arch: System freezes when coping large files from usb

Add the following two lines to /etc/sysctl.d/99-sysctl.conf (create if not exists)
vm.dirty_background_ratio=1 vm.dirty_ratio=2
vm.vfs_cache_pressure = 50

To apply use sudo sysctl -p /etc/sysctl.d/99-sysctl.conf or restart.

Tuesday, October 02, 2018

Arch: Python 3.6 rpc/rpc.h missing

The solution was to manually specify where `rpc/rpc.h` was for configuration: CPPFLAGS="-I/usr/include/tirpc" ./configure --prefix=/opt/python362 --enable-shared -I/usr/include/tirpc

Monday, September 24, 2018

youtube-dl: download mp3 and skip on failure

youtube-dl --extract-audio --audio-format mp3 -i PLAYLIST_URL_OR_VIDEO_LINK

Monday, September 17, 2018

MATLAB: vision.ShapeInserter crashes in Arch Linux

Seems its same problem as here: https://au.mathworks.com/matlabcentral/answers/364727-why-does-matlab-crash-on-linux-fedora-26-with-a-segmentation-violation-r2017b-or-later#answer_289066

Solution was to remove libfreetype files from /opt/MATLAB/R2016a/bin/glnxa64

sudo mv libfreetype* exclude/

Sunday, September 16, 2018

Arch xfonts 75 and 100

sudo pacman -S xorg-fonts-75dpi xorg-fonts-100dpi

Thursday, August 30, 2018

rsync: make a backup

Example:
rsync -avh -R --info=progress2 --delete /home/source/folder /run/media/backup/folder

Wednesday, August 29, 2018

rsync: copy files over ssh with non-default port

rsync -azvh -e 'ssh -p 22222' ./source_folder user@destination_ip:/destination/folder/name