Doing Date Math on the Command Line, Parts I & II | Linux Journal

If you’ve ever used a spreadsheet, you’ve probably used or seen functions for doing date math—in other words, taking one date and adding some number of days or months to it to get a new date, or taking two dates and finding the number days between them. The same thing can be done from the command line using the lowly date command, possibly with a little help from Bash’s arithmetic.

Source: Doing Date Math on the Command Line, Part I | Linux Journal

Source: Doing Date Math on the Command Line – Part II | Linux Journal

Arronax – Graphical Tool to Create Desktop Launcher in Ubuntu | UbuntuHandbook

For those who want to manually create desktop shortcut launcher in Ubuntu 16.04, Ubuntu 18.04, Ubuntu 19.04, Arronax is a good choice with graphical user interface.Other than creating .desktop file via Linux command, Arronax offers a graphical interface to create (and also edit) desktop shortcut for application, executable file, or URL.

Source: Arronax – Graphical Tool to Create Desktop Launcher in Ubuntu | UbuntuHandbook

The Atomic Pi – amazing new ~$35 single board computer runs Linux and Windows

One of the problems with the Raspberry Pi has always been that it uses an ARM-based processor, which means that some software and many operating systems don’t run (or don’t run as well) as they would on a device with an Intel or AMD processor. There have been boards that use non-ATM based processors in the past, but they have all been quite expensive compared to the $35 Raspberry Pi, which has more or less become the device against which all other small single board computers are measured these days. While the Raspberry Pi still has its place, especially where size is a major consideration, the new “Atomic Pi” in many ways appears to offer superior performance at about the same price point. This video gives more details:

Here are links to the manufacturer’s page on the Atomic Pi and the Frequently Asked Questions page. The manufacturer’s specifications for the device at the time of this post are as follows:

  • Genuine Intel Atom x5-Z8350 quad core with 2M Cache. Runs up to 1.92GHz with a 480MHz GPU. Eats RPi for dessert. Beats some desktops.
  • Loaded with memory: 2GB DDR3L-1600, 16GB eMMC, SD slot for adding more – up to 256GB
  • Full HDMI port with Intel HD Graphics & primary audio out
  • USB 3.0 and USB 2.0 ports
  • Fast dual band WiFI b/g/n/ac 2.4 & 5GHz WiFi RT5572 IPX connectors on board
  • Bluetooth 4.0 CR8510
  • Gigabit hardwired RJ45 Ethernet RTL8111G
  • 9-axis inertial navigation sensor with compass BNO055
  • Secondary XMOS audio output with class-D power amp.
  • TTL serial debug and expansion serial ports up to 3.6Mbps
  • Real time clock & battery
  • JST style connectors on top and a 26-pin header for power & GPIO below.
  • Runs on 5V. Typically 4-15 watts.
  • Legitimate licensed BIOS boots from SD, USB, or Ethernet. Linux comes preloaded… Yes, it’ll run Win10 32 or 64.
  • Large full breakout shield available with screw terminals for easy wiring, or order just the CPU and provide your own wiring.
  • Well documented – more specs here.

An Amazon purchaser “Heron” posted a great review of the Atomic Pi. Just in case it becomes inaccessible for some reason, here is what he said (spelling errors have been corrected, but no other changes made):

Customer Review

Heron
5.0 out of 5 stars
Great little board, incredible price
May 4, 2019
Verified Purchase

What I love:

* The price: other x86 SBCs with the same CPU cost $100. Other mini PCs from China cost at least $80. This board is a bargain.
* USB3.0, real gigabit Ethernet (it really reaches than 900mbps) and low power consumption make this board the best $35 NAS solution.
* x86_64 architecture, 2GB RAM and full Windows and Android x86 compatibility make this board the cheapest way to get a half decent PC fully capable of handling office tasks.
* The ability to choose your own WiFi antennas, exposed GPIOs, Linux and Android compatibility, the presence of a eMMC, onboard Bluetooth and WiFi, make this board quite versatile.
* The big heatsink didn’t allow the CPU to reach more than 55°C in my tests.

Now that it’s out of stock I’m regretting buying only one.

What I don’t like:

* The absence of a DC barrel jack. But this board can still be powered easily with breadboard jumpers.
* A 16GB eMMC is too small for Windows 10 (but it’s more than enough for Linux)
* I would have expected to find at least some cheap PCB WiFi antennas included in the box. Without them WiFi is basically useless and now I have to wait to get some from Aliexpress.
* There is no audio jack. You can either use audio over HDMI, or use a cheap USB sound card. Or use the big external expansion board (not yet available from Amazon).

Raspberry Pi comparison:

* The Atomic Pi is a little bigger than two Raspberry Pi.
* The Atomic Pi is much much faster than a Raspberry Pi.
* The Atomic Pi can display 1080p videos from VLC and even from YouTube (with Firefox). With the Raspberry Pi you have to use its own player and just forget about streaming a HD video from a browser without stuttering.
* The Atomic Pi requires a slightly more powerful power supply than the Raspberry Pi.
* The Atomic Pi doesn’t require a SD to work.
* The Atomic Pi, as a server, is just better in any way than the Raspberry Pi (storage speed, network speed, software compatibility).
* The Raspberry Pi, as a TV media center, can be controlled with your TV remote with HDMI-CEC. The Atomic Pi cannot.
* The Raspberry Pi has a more flexible and better community supported GPIO interface.
* Unlike the Raspberry, the Atomic Pi is already properly cooled out of the box. I didn’t found a way to overclock it, but I could easily change the frequency governor.

How I use it:

I soldered a power connector, from a barrel plug and a common breadboard pin strip. Then I disabled the PXE boot, I booted a Linux live pen drive and flashed the provided Debian Buster minimal image to the eMMC (instructions provided).
Then I installed a desktop environment (with the command taskel), so now I have a little Linux desktop. I also installed a Samba server, so it doubles as a quite fast NAS.
Finally I 3D printed a plastic case from Thingiverse and it’s now complete.

review image
review image
review image

As of mid-May, 2019 the Atomic Pi is once again available to order on Amazon, or it can be purchased from ameriDroid (be sure to check the estimated shipping dates). If you live in the USA you may be able to buy one direct from the manufacturer’s site if they have any currently in stock.

The one glaring omission on this device is that there is no standard power input jack – what were they thinking when they left this off of the main board?!  That missing power jack is the thing that has prevented them from having a 5-star rating on Amazon.  This document explains how to get power to the unit (one of the options is to purchase a “baby breakout” board that has a power jack for an additional $3).  Note that a power supply that produces 5V and at least 2.4A is required, and you will need a bit more power (higher Amperage) if you plan to power anything from one of the USB connections.  There’s a discussion on Reddit titled MEGATHREAD: Powering your Atomic Pi: Ask all your power questions here! and also a Powering Your Atomic Pi Megathread in the Atomic Pi Reddit forum. These threads might be helpful if you are trying to figure out how to power an Atomic Pi.

Also the manufacturer doesn’t appear to offer an enclosure of any kind. If you have access to a 3D printer you can print one yourself (for example, see here (this appears to be the enclosure shown in Heron’s review), here, or here), otherwise I’m sure that sooner or later someone will offer enclosures for the Atomic Pi.

Here are some additional articles covering the Atomic Pi:

Linux-powered Atomic Pi Is A Bite-sized PC With Intel CPU (Fossbytes)
Atomic Pi Brings Intel to Single-Board Computers (Tom’s Hardware)
Atom-powered $34 Atomic Pi: A music-friendly SBC for creators that runs Windows 10 (TechRepublic)
$35 Atomic Pi dev board with Intel Cherry Trail now available from Amazon (Liliputing)
$35 Atomic Pi Cherry Trail Linux SBC is now available worldwide (CNXSoft – Embedded Systems News)
Atomic Pi SBC is back with pre-orders on Amazon and Ameridroid (CNXSoft – Embedded Systems News)

How to install and run youtube-dl from actual source code, so that you can apply patches as needed

If you use the program youtube-dl, you may have noticed that from time to time things stop working. Usually it’s because something changes on a site and youtube-dl needs to be patched to deal with it. But what sometimes happens is that someone will submit a patch and then the youtube-dl developers will ignore that patch for many months before they finally get around to merging it into the program. The speed at which the youtube-dl developers fix issues with sites can seem glacial at times.

What’s frustrating is that if you browse through the issues section of the youtube-dl support area using an appropriate search term, you may find the fix for your problem, and maybe it’s just been sitting there for quite some time. But, since youtube-dl is distributed as a compiled binary you may think you have no way to apply it. But that’s not really true – at its core, the entire program is simply a multitude of Python scripts, and it can be run without first being compiled. And if you use it that way, then you can apply patches as needed to any of the python modules, whether they are patches you have written or patches that you have found in the issues area, or elsewhere on the Internet.

So here is how you can install and use youtube-dl using actual source code.

Source: How to install and run youtube-dl from actual source code, so that you can apply patches as needed – Two “Sort Of” Tech Guys

How to Use Raspberry Pi as a VPN Gateway

A VPN (Virtual Private Network) protects your privacy by routing all your Internet traffic through an encrypted server that your ISP (or hackers) can’t see. Setting up and using a log-free VPN service from your PC desktop is straightforward enough, but other devices in your home such as your game console and set-top box don’t let you install VPN software.

One solution is to buy a router that can connect directly to a VPN service, protecting all the traffic on your home network a single stroke. But it could be cheaper (and simpler) just to route all your traffic through a Raspberry Pi that remains connected to the VPN at all times.

Source: How to Use Raspberry Pi as a VPN Gateway – Tom’s Hardware

How to boot your Raspberry Pi from a USB mass storage device

In this tutorial, we will show you how you can boot your Raspberry Pi using a USB port instead of the micro-SD card slot!

Please note: This method of booting is experimental and is not guaranteed to work with all USB mass storage devices.

Source: How to boot your Raspberry Pi from a USB mass storage device (ModMyPi)

Install and Use ffmpeg in Ubuntu & Other Linux [Full Guide]

ffmpeg is a CLI (command line based) utility for processing media files. It is a framework with a multitude of features and, because of it’s open source license, it is the base for many widespread apps such as VLC, YouTube, iTunes and many more. A number of Linux video editors use ffmpeg underneath the GUI.

What I love even more about ffmpeg is that it can be used on it’s own to accomplish many processing tasks in a very simple manner (with one or two commands). However, it’s a very powerful program that can be used in more complex ways and even replace an editing workflow.

In this ffmpeg tutorial, I’ll show you how to install ffmpeg and I’ll be covering it’s different uses. I’ll even get into some more complex features.

Source: Install and Use ffmpeg in Ubuntu & Other Linux [Full Guide] (It’s FOSS)

Two pages to enhance Firefox privacy

Here are two pages to visit to safeguard your privacy when using Firefox. Please BE CAREFUL when making changes such as these; you probably do not want to make every single change shown because if you do, you may experience unintended consequences, and may possibly even “break” certain web sites:

1. Firefox Privacy – The Complete How-To Guide

Mozilla Firefox is arguably the best browser available that combines strong privacy protection features, good security, active development, and regular updates. The newest version of Firefox is fast, light-weight, and packed full of great settings to protect your privacy.

It is for this reason that I consider Firefox to be the best all-around browser for privacy and security. It remains a solid alternative to some of the other options, such as Google Chrome, Microsoft Edge, and Safari.

Another great aspect of Firefox is that it is highly customizable, which is the point of this guide. Below we will go over how you can customize Firefox to give you the security and privacy you desire, while still working well for day-to-day browsing.

Source: Firefox Privacy – The Complete How-To Guide (Restore Privacy)

2. Privacy/Privacy Task Force/firefox about config privacy tweeks

Firefox: Privacy Related “about:config” Tweaks

This is a collection of privacy related about:config tweaks. We’ll show you how to enhance the privacy of your Firefox browser.

Source: Privacy/Privacy Task Force/firefox about config privacy tweeks (Mozilla Wiki)

Use the Unofficial Bash Strict Mode (Unless You Looove Debugging)

I call this the unofficial bash strict mode. This causes bash to behave in a way that makes many classes of subtle bugs impossible. You’ll spend much less time debugging, and also avoid having unexpected complications in production.

Source: Use the Unofficial Bash Strict Mode (Unless You Looove Debugging) (aaron maxwell)