Automatically trim your SSD on Linux

Create a daily cron.

nano /etc/cron.daily/trim

While editing the trim file add the fstrim command to the file.

sudo fstrim -v / >> /dev/null 2>&1

Once you've added your SSD partitions, save the file and make it executable using the following command:

sudo chmod +x /etc ...
more ...

optipng Folder/Directory of Images

How to optipng a folder.

  • Install optipng
apt-get install optipng -y
  • Once installed cd to to the folder you wish to optimize
cd /var/www/img
  • Now run the optimize command,
optipng -o7 -strip all *.png
  • This will only optimize pngs in the directory you are in.
find /* -type f ...
more ...

UniFi Controller Debian Wheezy guide

  • To install the Unifi controller you will need to add Ubiquiti's and mongodDB's repo to the sources list
echo "deb debian ubiquiti" >> /etc/apt/sources.list
echo "deb dist 10gen" >> /etc/apt/sources ...
more ...

Update deluged to the latest version Debian Wheezy

How to update Deluged to the latest version without updating the system to Jessie.

Make sure deluged is installed and setup etc (e.g deluged deluge-webui deluge-common).

  • Download the latest build,
  • Also download deluge-common,
wget ...
more ...