asciinema – video for your terminal session

Info about asciinema:

Name         : asciinema
Version      : 1.4.0
Release      : 1.fc26
Arch         : noarch
Size         : 144 k
Source       : asciinema-1.4.0-1.fc26.src.rpm
Repo         : @System
From repo    : fedora
Summary      : Command line client (terminal recorder) for asciinema.org service
URL          : http://asciinema.org
License      : GPLv3
Description  : Asciinema is a free and open source solution for recording the terminal sessions
: and sharing them on the web.

To install, you can do:

dnf install asciinema

 

and here is and example:
Asciinema test video

Hope you find it useful if you have to show someone how to do something. Best part is – For just sharing a video link, you do not need to register as well 🙂

remind – set and manager reminders the easy way

remind – is a calendar and alarm program. Its simple to use from CLI. To install:

dnf install remind

and some details about it:

Name : remind
Version : 03.01.15
Release : 3.fc26
Arch : x86_64
Size : 440 k
Source : remind-03.01.15-3.fc26.src.rpm
Repo : @System
From repo : fedora
Summary : A sophisticated calendar and alarm program
URL : http://www.roaringpenguin.com/en/penguin/openSourceProducts/remind
License : GPLv2
Description : Remind is a sophisticated calendar and alarm program. It includes the following
: features:
: * A sophisticated scripting language
: * Plain-text, PostScript and HTML output
: * Timed reminders and pop-up alarms

search for a port number

I find myself doing google everytime I want to search for port number mapping. So, here is a short script to do just that 🙂

#!/bin/bash -
#===============================================================================
#
# FILE: portfind.sh
#
# USAGE: ./portfind.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Amit Agarwal (aka),
# ORGANIZATION:
# CREATED: 08/29/2017 19:00
# Last modified: Tue Aug 29, 2017 07:00PM
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
#This is the directory where you have mappings file downloaded
ODIR=/root
ofile=$ODIR/service-names-port-numbers.xml

if [[ ! -f "$ofile" ]]
then
wget http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml -O "$ofile"
fi
which xmlstarlet >/dev/null 2>&1
if [[ $? == 0 ]]
then
echo "xmlstarlet is installed"
else
apt-get install xmlstarlet
fi

#### xmlstarlet el -u service-names-port-numbers.xml
## registry/record - protocol and number
proto=${2:-tcp}
port=${1:-21}
(echo '';sed '1,4d' $ofile) |xmlstarlet sel -t -m "//record[protocol='$proto'][number=$port]" -o "Number(Protocol): " -v number -o '(' -v protocol -o ')' -n -o "Description :" -v description -n