Skip to content

Instantly share code, notes, and snippets.

View afraz-khan's full-sized avatar
☁️
data is reality

Afraz Khan afraz-khan

☁️
data is reality
View GitHub Profile
@afraz-khan
afraz-khan / AES_ENCRYPOR_DECRYPTOR.ts
Last active February 10, 2022 19:22
Nodejs AES Text Encrypter/Decrypter.
import {scryptSync, randomBytes, createCipheriv, createDecipheriv} from 'crypto';
export class Encrypter {
private algorithm: string = 'aes-192-cbc';
// encryption key for the cipher
private key: string;
constructor(key: string) {
this.key = key;
@afraz-khan
afraz-khan / CREATE_POSTGRESAL_DATABASE_RDS.md
Created February 10, 2022 11:29
Create new database in existing AWS RDS Postgresql Instance.

Log into your RDS Instance

  • Open a terminal into your local machine.
  • Get hold of credentials of any existing database in your RDS instance.
  • Log into the instance with those DB credentials using below command:
      psql \
       --host=<DB instance endpoint> \
       --port=<port> \
       --username=<master username> \
    

--password \