Monday, December 12, 2016

Source .bashrc upon ssh connection

Trick source

Add this to you .bash_profile file:

# .profile
if [ -n "$BASH" ] && [ -r ~/.bashrc ]; then
    . ~/.bashrc
fi

Friday, June 10, 2016

Anaconda2 jupyter notebook fix to export to pdf

Under Linux Mint, the problem arises when issuing:
 $ ~/anaconda2/bin/jupyter nbconvert my_notebook.ipynb --to pdf
During the conversion, LaTeX fails with the error:
! LaTeX Error: File `ulem.sty' not found.
This is solved by installing the texlive-generic-recommended package:
 $ sudo apt-get install texlive-generic-recommended

Get mathjax equations rendered under wkhtmltopdf

Trick source

Try using --javascript-delay [ms]. [ms] is the time in milliseconds wkhtmltopdf waits for complex scripts to finish. --javascript-delay 25000 is a good value to get the job done

Tuesday, May 24, 2016

Utility to split a .flac/.cue album in individual files

Use flacon.
sudo add-apt-repository ppa:flacon
sudo apt-get update
sudo apt-get install flacon

Wednesday, April 13, 2016

Install emacs 24.5 in linux mint

Trick source (partial)
sudo apt-get remove \
    emacs emacs24 emacs24-bin-common \
    emacs24-common emacs24-common-non-dfsg emacsen-common
wget -c http://gnu.mirror.vexxhost.com/emacs/emacs-24.5.tar.xz
tar vxf emacs-24.5.tar.xz
cd emacs-24.5/
sudo apt-get install libxml2-dev libgtk-3-dev \
    libtiff5-dev libgif-dev libXpm-dev libncurses-dev
./configure
make
sudo make install
cd /usr/bin
sudo ln -s /usr/local/bin/emacs emacs
Edit: dependencies for CentOS7:
sudo yum -y install libXpm-devel libjpeg-turbo-devel openjpeg-devel\
 openjpeg2-devel turbojpeg-devel giflib-devel libtiff-devel \
 gnutls-devel libxml2-devel GConf2-devel dbus-devel wxGTK-devel gtk3-devel

sudo yum install gcc make ncurses-devel giflib-devel libjpeg-devel libtiff-devel

Friday, March 11, 2016

Fix ugly fonts in GTK applications running in KDE4

Trick source

KDE uses the "system" font hinting as default (where is this system hinting config located?), and GTK not. So, make KDE uses the QT configuration, which will force GTK to use the same. On KDE Settings, Application Appearence, Fonts, I selected "Use anti-aliasing" as "Enabled", opened "Configure", than unchecked "exclude range", checked "use subpixel", and select "slight" for "hinting style". This will force gtk to use the same font hinting.

Friday, February 19, 2016

Activate PDF preview in KDE Dolphin.

Trick source

It seems that Dolphin doesn't preview PDF files by default. In order to enable this do:

$ sudo apt-get install kdegraphics-thumbnailers

Then launch Dolphin and do:

Dolphin > Settings > Configure Dolphin > General > Previews: Show previews for PostScript, PDF and DVI Files

Wednesday, January 13, 2016

Forget an unused wireless connection (Linux Mint)

Trick source

Sometimes unused wireless networks still appear in the network connection applet, or as it happened to me, a misconfigured connection doesn't allow itself to be reset. The trick to make the system to forget it is simple:

$ sudo ls -l /etc/NetworkManager/system-connections/

This will list the current network connections 'remembered' by the system. In order to 'forget' a connection, just delete the file representing the offending connection:

$ sudo rm /etc/NetworkManager/system-connections/NETWORK_NAME_TO_FORGET