PHP 8 is scheduled to release on November 26th, 2020. For a complete list of changes in PHP 8.0, see What’s new and changed in PHP 8.0
ondrej/php
PPA repositorysudo add-apt-repository ppa:ondrej/php # Press enter when prompted.
sudo apt-get update
sudo apt install php8.0-common php8.0-cli -y
sudo apt install php8.0-{bz2,curl,intl,mysql,readline,xml}
Install PHP 8 FPM
sudo apt install php8.0-fpm
Purge PHP 7.4
sudo apt purge '^php7.4.*'
Blind indexing is an approach to securely search encrypted data with minimal information leakage.
Let’s say that you are building a platform which is going to store large amounts of personal information. Data such as SSN numbers, Aadhaar card or Pan card etc. You also need the ability to search through them to run validation checks etc.
First you need to have your application and database servers running on different machines. You obvious don’t want your SALT keys and database to be on the same machine.
Let’s assume your table schema looks something like this (PostgreSQL):
CREATE TABLE users ( id SERIAL PRIMARY KEY,
first_name TEXT,
last_name TEXT,
ssn TEXT, /* encrypted */
ssn_bidx TEXT /* blind index…
Most developers prefer numerical primary keys because they auto increment, they are efficient to use and easy to generate. But that doesn’t mean that a primary key has to be a number.
UUID stands for Universally Unique Identifier. UUID is defined based on RFC 4122, “a Universally Unique Identifier (UUID) URN Namespace).
UUID is designed as a number that is unique globally in space and time. Two UUID values are expected to be distinct, even they are generated on two independent servers.
A UUID value is a 128-bit number represented as a UTF8 string of five hexadecimal numbers in the following format give…
It’s always a good practice to keep your database upgraded to the latest stable release. It helps in leveraging new features, keeping up security patches and other bug fixes.
Whenever we had to run a major version upgrade of our PostgreSQL database cluster, we had to take a complete dump. It becomes cumbersome specially when the database size is in terabytes.
Note: PostgreSQL minor version upgrades do not require a complete dump and restore. Only major versions require it.
Durning this process we need to make sure we have enough disk space to take a complete dump. Here AWS S3 comes in handy. …
One of my shell script was overlapping which resulted in 100% memory usage. So, I have written a validation that checks if the same shell script is running or not. If it’s not running it will continue to process further, otherwise exit. Below is the code snippet.
#!/bin/sh[ "$(pidof -x $(basename $0))" != $$ ] && exit## process further
Steps to resize NVMe volumes for Nitro Instances.
List information about all block devices on your machine.
ubuntu@localhost$ sudo lsblk
Increase the block size
ubuntu@localhost$ sudo growpart /dev/nvme0n1 1
If you are using XFS then do
xfs_growfs /dev/nvme1n1
Resize the root volume
ubuntu@localhost$ sudo resize2fs /dev/nvme0n1p1
See the resized blocks
ubuntu@localhost$ df -h
Localized day of week :
#!/bin/sh
DOW=$(date +"%a")
echo $DOW
In English
#!/bin/sh
LANG=C DOW=$(date +"%a")
echo $DOW
Recently I have moved a company from on-premise to AWS Cloud. They operate between 10 AM IST to 6 PM IST.
During business ours we upgrade our PostgreSQL RDS to db.t2.2xlarge
because we have quite a heavy traffic and require more db connections to be able to run analytics & other reporting tools. We also set ec2auto-scaling
to minimum 2 servers.
This is really good approach to reduce costs IF you can predict how much infra you need to scale. We haven’t considered this because we didn’t wanted to commit for a year / we are not sure how we will scale. …
About Rsync:
Rsync is a utility for efficiently transferring and synchronizing files across computer systems, by checking the timestamp and size of files.[3] It is commonly found on Unix-like systems and functions as both a file synchronization and file transfer program. The rsync algorithm is a type of delta encoding, and is used for minimizing network usage. Zlib may be used for additional data compression,[3] and SSH or stunnel can be used for data security.
Rsync is typically used for synchronizing files and directories between two different systems. For example, if the command rsync local-file user@remote-host:remote-file is run, rsync will use SSH to connect as user to remote-host.[4] …
I recently upgraded to Mac OS Mojave and Git started throwing error: Invalid active developer path
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode command line, open a Terminal and run this command:
$ xcode-select — install
That’s it. You should be good now
About