This article serves as a light-weight approach for preparing & writing user stories. If you are just starting your own product or lost in the middle of vague product requirements, here’s what you can use to start moving fast; and trust me, don’t look any further, what’s provided in this article is just what you need.

Photo by Zakaria Ahada on Unsplash

Step #1. Define the Personas

Personas are the types of users using the system. For an e-commerce system, these user types might be:

  1. The Customer. The signed-up site visitor that buys products.
  2. The Seller. The signed-up site visitor that adds product to his e-commerce shop.
  3. Anonymous Visitor. The site visitor that is not registered yet.
  4. The Admin. The administrator that handles administrative tasks on the site.
  5. The Support. The site support that can respond to customers or sellers.

Quick Note: Personas could resemble User Roles, but do not resemble permissions on the system. A Persona can be assigned permissions, for example, a Support User might…

If you have many bookmarks on Firefox and just feel you are going through trouble trying to organize them into sub-folders, there might be a much easier way to select a bookmark from the address bar

Photo by Kasturi Roy on Unsplash

Tip #1: To auto-suggest based on your Bookmarked Links use the * character on the address bar which will open a bookmarks’ search

Go to the address bar and type * then space then any word in your bookmark, this will now search and auto-suggest based on your bookmarks only.

Shit, shit and shit! I hate to have to remember those commands when setting up my python environment on my MacOS and configuring it to 3.8.5.

So here you go, a cheatsheet to nail it forever!

Install pyenv

brew install pyenv

Set the path correctly

$ echo ‘PATH=$(pyenv root)/shims:$PATH’ >> ~/.zshrc

List locally installed versions

$ pyenv versions
system

List all available python versions from all repositories

pyenv install --list

Install specific version

pyenv install 3.8.5

Again, List locally installed versions

$ pyenv versions
* system (Set by /Users/you/.pyenv/version)
3.8.5

Set python version as global version

pyenv global 3.8.5

Create…

There are three major reasons why I would completely avoid installing the PAM Google Authenticator Module from the Apt Ubuntu command which I detail here:

Reason #1: Google Authenticator PAM was last updated on July 2017 on the Ubuntu Repostiory (Reminder: It’s 2021)

You can check the package compilation date using the command apt-cache policy libpam-google-authenticator command on Ubuntu:

apt-cache policy libpam-google-authenticatorlibpam-google-authenticator:
Installed: (none)
Candidate: 20170702–1
Version table:
20170702–1 500
500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Surprisingly the last update was on 02-JUL-2017 for the apt package while the Github project was last updated on Dec 23rd, 2020. That’s three whole years of lost updates!

Reason #2: Google Auth PAM Package Is Not Security Reviewed By The Ubuntu Team

The Google Authenticator PAM module package is being published on Ubuntu through the bionic/universe…

Photo by Markus Spiske on Unsplash

AutoRun and AutoPlay are Windows OS enabled features that allow an inserted drive (e.g. USB memory) to run a script upon insertion. This is plain dangerous since an infected drive could lead to a Virus or Malware being installed on your PC.

How Can I Protect My Windows Machine?

Just permanently disable AutoPlay and AutoRun on your Windows machine.
Follow these steps:

Step #1: Disable AutoPlay

Click the MS key, type “AutoPlay” and select AutoPlay Settings, then click the “Off” toggle (see (1) below), then select “Take no action” from the Removable drive select box and “Take no action” from the Memory card select…

Photo by Jason Dent on Unsplash

This article will describe how to compile Google Authenticator directly from source by cloning the source code from the official GitHub repository.
If you need to know why you should compile and avoid the apt Ubuntu package, please read the previous article first.

How to Compile google-authenticator-libpam From GitHub?

Here we go, these steps will be sufficient to git clone it and compile it on your Ubuntu server:

apt update
apt install libqrencode-dev -y
apt install libtool -y
apt install libpam-dev -y
apt install autoconf -y
apt install make -y
cd /root
git clone https://github.com/google/google-authenticator-libpam.git
cd google-authenticator-libpam
./bootstrap.sh
./configure --libdir=/lib/x86_64-linux-gnu
make
make install
cd ..
rm -rf google-authenticator-libpam
apt remove libtool -y
apt remove libpam-dev -y
apt remove autoconf -y
apt remove make -y

In the upcoming articles, I will describe a bullet-proof way to set it up.

cp, rsync, tar?

Photo by Darren Nunis on Unsplash

Here are the three approaches mostly used for copying a directory on the same host from one folder (or partition) to another.

Suppose we have two folders, SOURCE_FOLDER and DESTINATION_FOLDER The three approaches for copying are:

Approach #1: Using cp

cp -R /path/to/SOURCE_FOLDER/* /path/to/DESTINATION_FOLDER/

Approach #2: Using rsync

rsync -a /path/to/SOURCE_FOLDER/ /path/to/DESTINATION_FOLDER

Approach #3: Using tar

cd /path/to/SOURCE_FOLDER; tar cf - . | (cd /path/to/DESTINATION_FOLDER; tar xvf -)

Copying a 2.5 GB directory on a Windows Subsystem Linux Ubuntu folder:

COMMAND              TIME TAKEN 
----------------------------------------------------------
cp 12.167 seconds
rsync 11.763 seconds
tar 8.125 seconds

tar surprisingly outperforms both cp and rsync by a huge factor.

tar consumes only ~67% the time cp takes, and ~69% the time rsync takes.

Hope this helps on your next partition migration.

Preparing A Resilient Slave Replica

When someone is asked to configure a PostgreSQL slave replica, the first thing that get’s done usually is “Googling It”, then clicking on the first title that sounds like a good How-To article without paying any attention to the subtle details that could make a huge difference between building a sloppy slave replica and a resilient one.

This recipe focuses on building a resilient setup for a Slave replica of a Master of any size and band-width usage and applies safety margins into the configuration in case a slave lag or conflict gets introduced (arising from any unexpected conditions).

Let’s…

… and a bash script to sum it all up (at the end)

In this article, I will create a partition that fully uses a new block device.
I will avoid the interactive mode while using the parted command to make it easier to automate this task using a bash (or ansible) script.

First comes first: Identify the block device you need to create a partition into.

A block device is named as /dev/sdb or /dev/sda (notice no numbers at the end)

A block device holds one or more partitions. A block device could be formatted and used directly without any partitions, but this is not advised.

Instead one or more partitions should be created inside a block device. A partition name holds the block device name…

Basil A.

A Software Engineer with interests in data storage and database systems done right.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store