Skip to content

Instantly share code, notes, and snippets.

View HugaidaS's full-sized avatar
Focusing

Victoria HugaidaS

Focusing
View GitHub Profile
@HugaidaS
HugaidaS / SSL_CERTBOT.md
Last active August 14, 2023 18:50
Install SSL on EC2 with Certbot

This instruction will help you to install SSL certificate on your server using Certbot

1. Create an elastic IP for the EC2 instance you are integrating.

  1. Click Allocate new address in the Elastic IPs page.
  2. Then, click Allocate in the next page.
  3. Right-click the row of the newly created elastic IP, and click Associate address.
  4. Choose the EC2 instance you are integrating.

2. Create a DNS record for the domain you are integrating (GoDaddy in this example).

@HugaidaS
HugaidaS / nodejs-encryption.js
Created May 30, 2023 13:09
Encryption algorithm in Node js crypto module to secure the data
const crypto = require("crypto");
const { scryptSync, createDecipheriv, createCipheriv } = crypto;
const AES_ALGORITHM = process.env.AES_ALGORITHM || "aes-256-gcm";
const AES_PASSWORD =
process.env.AES_PASSWORD ||
"2171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffae5f79c5915c0";
const AES_SALT = process.env.AES_SALT || "0993d7d622a7c4c2da32f6efda0f4448";
const AES_IV =
process.env.AES_IV ||