Skip to content

Instantly share code, notes, and snippets.

View Ameen-Alam's full-sized avatar
💭
I may be slow to respond.

Ameen Alam Ameen-Alam

💭
I may be slow to respond.
View GitHub Profile
## Install Docker
yum install docker-ce-3:19.03.13-3.el8.x86_64 docker-ce-cli-1:19.03.13-3.el8.x86_64 containerd.io-1.4.11-3.1.el8.x86_64 -y
yum update -y
#!/bin/bash
wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.9.tgz
https://www.sslshopper.com/article-most-common-openssl-commands.html
function encode(code) {
if (!code) return '';
let encode = '';
for (let i = 0; i < code.length; i++) {
let count = 1;
for (let j = i; j < code.length; j++) {
if (code[i] !== code[j+1]) break;
count++;
i++;
@Ameen-Alam
Ameen-Alam / EBS-volume-available-Linux
Created April 1, 2021 20:42
Make an Amazon EBS volume available for use on Linux
[ec2-user ~]$ lsblk
[ec2-user ~]$ sudo file -s /dev/xvdf
/dev/xvdf: data
[ec2-user ~]$ sudo file -s /dev/xvda1
/dev/xvda1: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
[ec2-user ~]$ sudo lsblk -f
Warning
Do not use this command if you're mounting a volume that already has data on it (for example, a volume that was created from a snapshot). Otherwise, you'll format the volume and delete the existing data.
[ec2-user ~]$ sudo mkfs -t xfs /dev/xvdf
#!/bin/bash
yum update -y
yum install -y httpd
systemctl start httpd.service
systemctl enable httpd.service
EC2_AVAIL_ZONE=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)
echo "<h1>Hello World from $(hostname -f) in AZ $EC2_AVAIL_ZONE</h1>" > /var/www/html/index.html
@Ameen-Alam
Ameen-Alam / Node-Production-Pm2
Last active March 27, 2021 17:05
Node-Production-Pm2
#!/bin/bash
cd ~
sudo su
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
bash nodesource_setup.sh
apt-get install -y nodejs git build-essential
echo NodeJs Version
Medium.com
https://stackoverflow.com/
https://www.w3resource.com/
https://www.sqlservertutorial.net/
https://www.a2hosting.com/
https://data36.com/
https://www.w3schools.com/
https://www.tutorialspoint.com/
https://github.com/
https://gist.github.com/
Install MongoDB Community Edition on Ubuntu
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
MongoDB (code=exited, status=14)
cd /tmp; ls -l *.sock
chown mongodb:mongodb mongodb-27017.sock
https://medium.com/@adhityad3v/mongodb-code-exited-status-14-f9f9f3d3e244