#!/bin/bash printf -v date '%(%Y-%m-%d)T\n' -1 echo $(( ($(date -d $1 +%s) - $(date -d $date +%s)) / 86400 )) days Above is a bash script to output the number of days between today and some future date. Copy it into a file, e.g., diffdate.sh, into a directory, e.g., ~/bin/scripts. Then, enter the directory you … Continue reading bash: Number of Days Between Today and Some Future Date
Tag: Linux
Fun With Fortune in Linux
Fortune provides a random quote or aphorism every time you open a terminal in Linux. I wanted to have a personalized fortune using zuihitsu quotes posted on this site come up whenever I opened a terminal. If you want to do something similar, here's the procedure. To check if you have it installed, simply type … Continue reading Fun With Fortune in Linux
Revisiting the ASUS C201
Two and half years ago, I came across libreboot. I was looking for a linux laptop and came across this bit on the ASUS C201 page: "This is unlike the other current libreboot laptops (Intel based). In practise, you can (if you do without the video/wifi blobs, and replace ChromeOS with a distribution that respects … Continue reading Revisiting the ASUS C201
Easiest Guide to .bashrc
"Digesting the syntax and logic of how a bash program is structured has always been an issue. I hope this will make people’s lives a bit easier and make bash a bit more straight forward."-Olafur Palsson, "Easiest Guide to .bashrc" itnext.io. February 7, 2021.
Emacs: Rebinding Caps Lock to Ctrl
I was reading this piece, The Beginners Guide to Emacs, which suggested making the Caps Lock Key into CTRL. I've been using emacs for years, and it never occurred to me to make this change. Lovely! Since it isn't in the instructions, I'd thought I'd make a note here in case it comes up in … Continue reading Emacs: Rebinding Caps Lock to Ctrl
GOG Games on Linux, Featuring Blade Runner
"Blade Runner is a point-and-click adventure, a genre that was still very popular on PCs at the time of its release. Games like Beneath a Steel Sky had already used the format to tell Blade Runner-inspired cyberpunk stories. Given the usual state of movie adaptations, a Blade Runner adventure game wouldn’t necessarily have been anything … Continue reading GOG Games on Linux, Featuring Blade Runner
An Introduction To Data Science On The Linux Command Line
...provide[s] the reader with a brief overview for a number of different Linux commands. A special emphasis will be placed on explaining how each command can be used in the context of performing data science tasks. The goal will be to convince the reader that each of these commands can be extremely useful, and to … Continue reading An Introduction To Data Science On The Linux Command Line
A Quick Introduction to StumpWM on Linux
"StumpWM is a tiling, keyboard driven X11 Window Manager written entirely in Common Lisp." Why Use It StumpWM will likely cut down a lot of your use of a mouse. There's many reasons to use the mouse less, such as speed (entering in a key combination is faster than using a mouse), carpal tunnel syndrome, … Continue reading A Quick Introduction to StumpWM on Linux
Tech Veganism
"One place where the veganism metaphor breaks down is that, although nearly anyone can be a vegan, tech veganism is mostly practiced by those who are expert enough or privileged enough to learn the elaborate workarounds to avoid the GAFAMs of the world. Setting up an Ubuntu laptop, a LineageOS phone, a Fastmail account, and … Continue reading Tech Veganism
Webster’s Revised Unabridged Dictionary (1913) on StarDict on Ubuntu/Debian
So, after reading "You’re probably using the wrong dictionary," I thought I would give installing Webster's Revised Unabridged Dictionary (1913) on a Debian-flavor of Linux a try and write it up the process and some observations of its use. Installation on a Debian-flavor of Linux is straight-forward: $ sudo apt-get install stardict$ cd Downloads$ wget … Continue reading Webster’s Revised Unabridged Dictionary (1913) on StarDict on Ubuntu/Debian
