Update joplin on ubuntu


What is Joplin?

Joplin is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are searchable, can be copied, tagged and modified either from the applications directly or from your own text editor. The notes are in Markdown format.

Joplin is also available for Windows, Linux, macOS, Android and iOS (the terminal app also works on FreeBSD). A Web Clipper, to save web pages and screenshots from your browser, is also available for Firefox and Chrome.

Update Joplin on Ubuntu –

You can run following command to update Joplin version.

wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash

References

https://github.com/laurent22/joplin

https://discourse.joplinapp.org/

https://joplinapp.org/

Download youtube videos on Ubuntu using command line


youtube-dl is an open-source and light weight download manager for video and audio content from YouTube and many other video hosting websites.

To install it on Ubuntu, run following command –

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

To download youtube playlist videos, run following command –

youtube-dl -cit -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' "https://www.youtube.com/playlist?list=ListId"

where ListId is the id of the youtube playlist.

To download youtube video, run following command –

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' 'https://www.youtube.com/watch?v=VideoId'

where VideoId is the id of the video being downloaded.

References

https://youtube-dl.org/

https://en.wikipedia.org/wiki/Youtube-dl

Upgrade Pcloud version on Ubuntu using shell script


Pcloud is a secure cloud storage which has 256-bit AES encryption for all files. They provide up to 10 GB Free! I use it mainly as a music player. Pcloud music player android app is very cool.

If you have installed Pcloud on your ubuntu system and wanted to upgrade to latest version, various steps need to be performed.

Following script have automated many steps –

#!/bin/bash
###############################################################################
#Script Name    : pcloud-Update.sh                       
#Description    : Update latest Pcloud version                                                                
#Author         : Suraj
################################################################################
echo
# show system uptime
uptime
#change folder location
echo

# Echo on
set -x #echo on

# Change directory to downloads folder
cd /home/username/Downloads

# Delete existing pcloud file
rm -f pcloud

# Download new Pcloud file
wget https://www.pcloud.com/how-to-install-pcloud-drive-linux.html?download=electron-64

# Allow executing file as a program
chmod +x pcloud

# Kill existing pcloud processes
kill -s 9 `pgrep -l -u username | grep pcloud | cut -f1 -d" "`

# Copy updated version to bin folder
sudo cp pcloud /usr/bin/

echo 'SUCCESS'

echo 'Start Pcloud from Applications menu...'

exit 0

Save the above script as e.g pcloud-Update.sh

This script assumes that pcloud binary is on /Downloads folder and your system is 64 bit. Also make sure to replace ‘username’ in the script with your ubuntu username.

Hope it helps.

Free space in the /boot partition on Ubuntu


Usually you get this error when /boot partition is full or near to full.

You can usually remove old, unused kernels on /boot by running following command –

sudo apt autoremove

There is also an utility purge-old-kernels which also recommends to use sudo apt autoremove command.

After running this command, you can run following command to check the space on /boot.

df -h /boot/

Squid Web Caching Proxy configuration on Ubuntu or Linux Mint


Optimising Web Delivery

Squid is an excellent caching proxy for the Web. It supports HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on most available operating systems.

Installation

To install squid on Ubuntu or Linux mint, enter the following command in the terminal.

sudo apt-get install squid squid-common

Following command can be used to check the logs.

sudo tail -f /var/log/squid/access.log

Squid can also be used as an adblocker tool.

Disable ads using Squid

Squid has the ability to read a list of IPs from a text file and block those IPs from clients using the proxy. Your clients in turn will not have to be bothered with ads.

The following lines need to be added anywhere in your squid.conf file which is usually located in /etc/squid/ and you will be putting your list of ad servers called adBlock.txt in the same directory.

Please note: You can copy hosts from here and paste into your adBlock.txt file. Remove the IPs from the left side of the file and only keep the list of domain names.

## disable ads
acl blockAds dstdom_regex "/etc/squid/adBlock.txt"
http_access deny blockAds

Once it is done, restart the Squid service by entering following command:

sudo service squid restart

Now configure network setting in your browser to use the manual proxy. On Firefox, It will look like:

Squid-Proxy-Firefox-Setup

Remember that default port used by Squid is 3128. It can be configured and changed from the Squid.conf file.

Here is the official link for more details: http://www.squid-cache.org