Skip to content

Instantly share code, notes, and snippets.

@mehargags
mehargags / VNC-BG-Wallpaper-Creator.sh
Last active February 23, 2025 12:03
VNC-BG-Wallpaper-Creator
#!/bin/bash
### HOW TO RUN ####
### GISTURL="https://gist.github.com/mehargags/5f94ae0ac896bcf85ee13015c2909595/raw"
### echo ${GISTURL}
### curl -s -L ${GISTURL}| bash
### or
### bash <(curl -s -L $GISTURL)
###
@mehargags
mehargags / Swap-Check-Make.sh
Created February 18, 2025 12:21
Swap-Check-Make.sh
#!/bin/bash
# Check if swap is enabled
if swapon --show | grep -q "swap"; then
echo "Swap is already enabled."
else
echo "Swap is not enabled. Creating a swap file..."
# Create a 2GB swap file using fallocate
fallocate -l 2G /swapfile
@mehargags
mehargags / Prompt-user-domain
Last active March 13, 2025 19:37
Prompt-user-domain
# Add this to your ~/.bashrc
# Colors
USER_GREEN="\[\033[32m\]"
BRIGHT_AQUA="\[\033[96m\]"
PINK="\[\033[38;5;213m\]"
RESET="\[\033[0m\]"
# Custom prompt function
custom_prompt() {
@mehargags
mehargags / IPv4-BAN-LIST
Last active February 24, 2025 12:22
IP-BAN-LIST
# DigitalOcean IPv4 Ranges
5.101.96.0/21
5.101.104.0/21
5.101.112.0/21
5.101.120.0/21
24.199.64.0/20
24.199.80.0/20
24.199.96.0/20
24.199.112.0/20
37.44.200.0/21
# Digital Ocean IPv6 Ranges
2400:6180::/32
2400:6180:0::/40
2400:6180:100::/40
2400:6180:200::/40
2400:6180:300::/40
2400:6180:400::/40
2400:6180:500::/40
2400:6180:600::/40
2400:6180:700::/40