Skip to content

Instantly share code, notes, and snippets.

View Mitrajit's full-sized avatar
💢
Straining my brain

Mitrajit Chandra Chandra Mitrajit

💢
Straining my brain
View GitHub Profile
@Mitrajit
Mitrajit / Screen2.html
Last active January 27, 2022 16:19
LMB project
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Picture of La Martinière For Boys</title>
</head>
@Mitrajit
Mitrajit / serverinstall.sh
Last active April 17, 2023 10:53
This script is used to update, install node.js, npm, pm2 and nginx.
echo "updating system"
sudo apt update
echo "Installing node 16.x"
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
sudo apt-get install -y nodejs
echo "Installing latest npm"
npm install -g npm@latest
echo "Installing pm2"
npm install pm2 -g
echo "Installing nginx"
@Mitrajit
Mitrajit / install_mongo_6.0.8.sh
Created August 2, 2023 20:47
Installing mongo db 6.0.8 in ubuntu
#!/bin/bash
# Function to install MongoDB
install_mongodb() {
echo "Importing the public key used by the package management system."
sudo apt-get install -y gnupg curl
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
@Mitrajit
Mitrajit / proxy.sh
Last active January 14, 2024 01:01
ip_address=$(ip addr show eth0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
# Check if we got the IP address
if [ -z "$ip_address" ]; then
echo "No IP address found for eth0"
exit 1
fi
#!/bin/bash
CURRENT_PATH=$(echo $PATH)