This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ====================== | |
| # NGINX + SSL Deployment Script | |
| # ====================== | |
| set -euo pipefail | |
| # --- Defaults & Flags --- | |
| DRY_RUN=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // for nextjs project | |
| module.exports = { | |
| apps: [ | |
| { | |
| name: "project-client", | |
| script: "node_modules/next/dist/bin/next", | |
| args: "start", | |
| env: { | |
| NODE_ENV: "production", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Source: https://twitter.com/calebporzio/status/1151876736931549185 | |
| <div class="flex"> | |
| <aside class="h-screen sticky top-0"> | |
| // Fixed Sidebar | |
| </aside> | |
| <main> | |
| // Content | |
| </main> |
NewerOlder