Skip to content

Instantly share code, notes, and snippets.

View euhansarkar's full-sized avatar
🎯
Focusing

Euhan Sarkar euhansarkar

🎯
Focusing
View GitHub Profile
#!/bin/bash
# ======================
# NGINX + SSL Deployment Script
# ======================
set -euo pipefail
# --- Defaults & Flags ---
DRY_RUN=false
#!/bin/bash
set -euo pipefail
# 1) Non‑interactive APT
export DEBIAN_FRONTEND=noninteractive
# 2) Detect Ubuntu codename
CODENAME=$(grep -E '^UBUNTU_CODENAME=' /etc/os-release | cut -d= -f2)
echo "→ Detected Ubuntu: $CODENAME"
#!/bin/bash
# Install wget if not present
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& out=$(mktemp) && wget -nv -O "$out" https://cli.github.com/packages/githubcli-archive-keyring.gpg \
&& cat "$out" | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
#!/bin/bash
set -e
GREEN='\033[0;32m'
NC='\033[0m'
# Check for Ubuntu version
echo -e "${GREEN}Checking Ubuntu version...${NC}"
UBUNTU_CODENAME=$(lsb_release -cs)
// for nextjs project
module.exports = {
apps: [
{
name: "project-client",
script: "node_modules/next/dist/bin/next",
args: "start",
env: {
NODE_ENV: "production",
#!/bin/bash
# Function to check if a package is installed
check_package() {
if ! dpkg -l | grep -q "$1"; then
echo "$1 is not installed. Installing..."
sudo apt update
sudo apt install -y "$1"
else
echo "$1 is already installed."
@euhansarkar
euhansarkar / linux_setup_configuration
Last active May 7, 2025 17:44
Install And Config Oh-My-Zsh with NVM
#!/bin/bash
# Update and upgrade system
sudo apt update && sudo apt upgrade -y
# Install necessary packages
sudo apt install -y build-essential curl file git zsh
# Install zsh and set it as default shell
sudo chsh -s $(which zsh)
www.google.com
alt.aspmx.1.google.com
client.1.google.com
clients.1.google.com
gmail-smtp-mas.1.google.com
misc-anycast.1.google.com
104-cache-blicnet.google.com
119-cache-blicnet.google.com
216-239-45-10.google.com
31.google.com
import { useState } from "react";
import { BsArrowLeftShort, BsSearch, BsChevronBarDown } from "react-icons/bs";
import { AiFillEnvironment } from "react-icons/ai";
import { RiDashboardFill } from "react-icons/ri";
function App() {
const [open, setOpen] = useState(true);
const [subMenuOpen, setSubMenuOpen] = useState(false);
const Menus = [
{
// Source: https://twitter.com/calebporzio/status/1151876736931549185
<div class="flex">
<aside class="h-screen sticky top-0">
// Fixed Sidebar
</aside>
<main>
// Content
</main>