Posts

Digital Marketing

Never underestimate the power of dreams and the influence of the human spirit.

Never underestimate the power of dreams and the influence of the human spirit. Wilma Rudolph American sprinter and Olympic medalist

Symmetric Encryption and Decryption with a key file

Generate a random 256-bit key To generate a random 256-bit key using /dev/urandom, you can directly extract the random data without the need for additional hashing. Here’s how you can do it: $ dd if=/dev/urandom of=/path/to/your/keyfile bs=1 count=32 In this command: if=/dev/urandom specifies the input source as /dev/urandom. of=/path/to/your/keyfile specifies the output file where your key will be saved. bs=1 sets the block size to 1 byte. count=32 specifies that we want 32 bytes (256 bits) of random data. Example: $ dd if=/dev/urandom of=symmetric_keyfile.key bs=1 count=32 Encryption We can use this command to encrypt the sample.txt file: $ openssl enc -in sample.txt -out sample.txt.enc -e -aes256 -pbkdf2 -kfile symmetric_keyfile.key Decryption $ openssl enc -in sample.txt.enc -out sample_decrypted.txt -d -aes256 -pbkdf2  -kfile symmetric_keyfile.key

gdebi-core is a simple tool to install deb packages on Ubuntu and Debian systems.

gdebi-core can resolve and install the dependencies of local deb packages, as well as the build-depends of local debian/control files. It is a command-line utility that can be used with the gdebi command. Some of the advantages of using gdebi-core are: It can handle multiple deb packages at once, unlike dpkg. It can automatically download and install the required dependencies from the official repositories, unlike dpkg. It can check the compatibility and integrity of the deb packages before installing them, unlike dpkg. It can also install the recommended and suggested packages, if desired, unlike apt. Some of the disadvantages of using gdebi-core are: It can only install local deb packages, not remote ones, unlike apt. It can only install deb packages that are compatible with the current system, not older or newer ones, unlike dpkg. It can only install deb packages that are available in the official repositories, not third-party ones, unless the corresponding sources are added, unlike

how to install mycli on Amazon Linux 2023

sudo dnf install pip sudo pip install mycli

Install MySQL on Amazon Linux 2023

Update the packages of your Amazon Linux 2023 by running the following command in your terminal: $ sudo dnf update. Download the MySQL Yum repository from the Oracle website using the following command: $ sudo wget https://dev.mysql.com/get/mysql80-community-release-el9-5.noarch.rpm. Install the MySQL community server and client on your system by running the following command: $ sudo dnf install mysql-community-server. Start the MySQL service and enable it to activate automatically with the system boot or crash by running the following command: $ sudo systemctl start mysqld and $ sudo systemctl enable mysqld. Secure your MySQL installation by setting a root password, removing anonymous users, disabling remote root login, and more. You can find the default password set by MySQL for the root user by running the following command: $ sudo grep 'temporary password' /var/log/mysqld.log. After that, run the following command and follow the prompts: $ sudo mysql_secure_installation.

Monotonic timers relative to different starting points

Settings and their starting points Setting Meaning OnActiveSec= Defines a timer relative to the moment the timer unit itself is activated. OnBootSec= Defines a timer relative to when the machine was booted up. In containers, for the system manager instance, this is mapped to  OnStartupSec= , making both equivalent. OnStartupSec= Defines a timer relative to when the service manager was first started. For system timer units this is very similar to  OnBootSec=  as the system service manager is generally started very early at boot. It's primarily useful when configured in units running in the per-user service manager, as the user service manager is generally started on first login only, not already during boot. OnUnitActiveSec= Defines a timer relative to when the unit the timer unit is activating was last activated. OnUnitInactiveSec= Defines a timer relative to when the unit the timer unit is activating was last deactivated.

Let ssh client to always add the key to a running ssh-agent

Add the following configuration setting to your local ssh config file ~/.ssh/config (this works since SSH 7.2): AddKeysToAgent  yes There's no need to ssh-add it beforehand.