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/

Pihole FTL v5.5 released


In September 2020, the JSOF Research Lab discovered few security vulnerabilities in dnsmasq an open-source DNS forwarding software in common use. Dnsmasq is very popular, and they have identified approximately 40 vendors whom they believe use dnsmasq in their products, as well as major Linux distributions. They named the set of vulnerabilities as dnspooq. Red Hat describes the issues here.

Pihole FTL 5.5 release is mainly to update to dnsmasq v2.83.

To update Pihole on your system, run following command –

pihole -up

Pihole adlist and Regex blacklist


Pi-hole is network-based ad-blocking software as well as a custom DNS server. It uses DNS sinkholing and blocklists to stop internet ads, telemetry etc..

There are several adlists available for pihole, but I would like to recommend following list of pihole –

https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts
https://v.firebog.net/hosts/Airelle-trc.txt
https://v.firebog.net/hosts/Easyprivacy.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.2o7Net/hosts
https://v.firebog.net/hosts/Prigent-Ads.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts
https://blocklist.site/app/dl/tracking
https://v.firebog.net/hosts/AdguardDNS.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Risk/hosts
https://raw.githubusercontent.com/anudeepND/blacklist/master/facebook.txt
https://zerodot1.gitlab.io/CoinBlockerLists/hosts
https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/android-tracking.txt
https://phishing.army/download/phishing_army_blocklist.txt
https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt
https://raw.githubusercontent.com/anudeepND/youtubeadsblacklist/master/domainlist.txt
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt
https://blocklist.site/app/dl/crypto
https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/master/pihole-tiktok.txt
https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt
https://raw.githubusercontent.com/SweetSophia/mifitxiaomipiholelist/master/mifitblocklist.txt
https://raw.githubusercontent.com/krombopulosM/TikTok-blocklist/master/tiktok%20blocklist.txt

Other than the list above you can use following regex blacklist to block ads and telemetry –

^adim(age|g)s?[0-9]*[-_.]	
	
^(.+[-_.])??adse?rv(er?|ice)?s?[0-9]*[-.]	
	
^adtrack(er|ing)?[0-9]*[-.]	
	
^advert(s|is(ing|ements?))?[0-9]*[-_.]	
	
^aff(iliat(es?|ion))?[-.]	
	
^analytics?[-.]	
	
^banners?[-.]	
	
^beacons?[0-9]*[-.]	
	
^count(ers?)?[0-9]*[-.]	
	
^(.+[-_.])??m?ad[sxv]?[0-9]*[-_.]	
	
^pixels?[-.]	
	
^stat(s|istics)?[0-9]*[-.]	
	
^telemetry[-.]	
	
^track(ers?|ing)?[0-9]*[-.]	
	
^traff(ic)?[-.]	
	
^(.+[-_.])??xn--	
	
^tiles\..*services\.mozilla\.com$	
	
(^|\.)xbcs\.net$	
	
(^|\.)ads\.roku\.com$	
	
(^|\.)logs\.roku\.com$	
	
(^|\.)avcdn\.net$	
	
(^|\.)cn$

Enjoy pihole and donate if you like the project to support the developers.

Fix: WordPress publish error


While publishing my posts, I have came across following error on my wordpress blog.

Error message is – “Scheduling failed. Sorry, you are not allowed to assign the provided terms”.

Fix:

  1. Click on “Save draft” to save your post.
  2. Try to re-edit your post
  3. Publish

It will fix the error and your post will be published or scheduled. I could not figure out what is causing the error, but the above fix worked for me.

Update Pihole docker container using portainer


In this article, lets take a look on how to update pihole docker container version to latest version using Portainer.

What is Pi-hole?

Pi-hole is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole and optionally a DHCP server, intended for use on a private network.

What is Portainer?

Portainer is an open source container management tool for Kubernetes, Docker, Docker Swarm and Azure ACI. It allows anyone to deploy and manage containers without the need to write code.

Pihole docker container update using Portainer

Pihole usually displays when there is a new version available on the footer as shown in the below screenshot.

Pihole update available
  1. Login to your Portainer instance
  2. Goto containers

3. Select ‘Pihole’ container

4. Click on the ‘Recreate’ button. It will display following prompt –

5. Click on the ‘Pull latest image’ option and then click on ‘Recreate’ button.

6. It will take few minutes to download latest Pihole image and recreating a container.

7. Once done, you can goto your pihole instance and verify that pihole is updated to latest version, as shown below –

Microsoft .NET 5


Microsoft supports two .NET implementations for building server-side apps – .NET Framework and .NET 5 (including .NET Core).

.NET 5.0 is the next major release of .NET Core following 3.1. Microsoft has skipped version numbers 4.x to avoid confusion with .NET Framework 4.x. “Core” from the name has also been dropped to emphasize that this is the main implementation of .NET going forward. .NET 5.0 supports more types of apps and more platforms than .NET Core or .NET Framework.

Some of the .NET 5 Highlights

There are many important improvements in .NET 5.0:

  • .NET 5.0 is battle-tested
  • High Performance
  • C# 9 offer new language improvements
  • .NET libraries have enhanced performance

Use .NET 5 for your server application if:

  • You have cross-platform needs.
  • You are targeting microservices.
  • You are using Docker containers.
  • You need high-performance and scalable systems.
  • You need side-by-side .NET versions per application.
dotnet5

Here is the .NET release schedule –

dotnet-schedule

Dotnet 5 can be downloaded here – https://dotnet.microsoft.com/download/dotnet/5.0

Reference-

https://devblogs.microsoft.com/dotnet/announcing-net-5-0

https://docs.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server

https://docs.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server

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/