free up disk space linux system with bleachbit

By | Linux | No Comments

Free up disk space on linux with bleachbit

sudo apt-get install python-gtk2 -y
apt --fix-broken install
apt-get install python-gtk2 -y
dpkg -i bleachbit_2.2_all_ubuntu1804.deb
bleachbit --list | grep -E "[a-z0-9_\-]+\.[a-z0-9_\-]+" | xargs bleachbit --clean

unmount sshfs

By | Linux | No Comments

The easy way to unmount sshfs goes as follows

sudo umount -l directory

Use -l “lazy” which is required for unmounting sshfs

-l, --lazy              detach the filesystem now, clean up things later

speed up rsync fast

By | Linux | No Comments

Speed up rsync over lan or wan with this simple addition to your command.

-e "ssh -T -c aes128-ctr -o Compression=no -x"

Her we use the new command in a safe (dry run) example

rsync -avn --progress -e "ssh -T -c aes128-ctr -o Compression=no -x" source/ user@x.x.x.x:/destination

Run Python with Forever

By | Linux | No Comments

It is easy to use Python with forever.js:

forever start -c python

To use it with virtualenv is a little bit more complicated, I did it using a bash script (call it python_virtualenv):

# Script to run a Python file using the local virtualenv
source bin/activate
bin/python $@

Now use that script with forever:

forever start -c ./python_virtualenv

php7.0 debian jessie docker install

By | Linux | No Comments

RUN apt-get update -y
RUN apt-get install -y libgmp-dev re2c libmhash-dev libmcrypt-dev file
RUN ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/
RUN docker-php-ext-configure gmp 
RUN docker-php-ext-install gmp
RUN docker-php-ext-configure mcrypt
RUN docker-php-ext-install mcrypt

RUN echo > $PHP_INI_DIR/conf.d/gmp.ini
RUN echo > $PHP_INI_DIR/conf.d/mcrypt.ini

cuda 9.1 install ubuntu 16.04 apt-get

By | Linux | No Comments

Install CUDA 9.0 on Ubuntu 16.04 using apt-get – easiest method

First install and switch default gcc to gcc 7.1

sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y g++-7 gcc-7 && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 && \
sudo update-alternatives --config gcc

Now setup

sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-get update
sudo apt-get install -y cuda-9-1