Skip to content

Instantly share code, notes, and snippets.

View HafizAhmadJamil's full-sized avatar

Ahmad Jamil HafizAhmadJamil

  • PTCL
  • Gujranwala Pakistan
  • 21:27 (UTC -12:00)
View GitHub Profile
#!/bin/bash
set -e # Exit on any command failure
# Variables
STORAGE="local-lvm"
MEMORY=4096
DISK_SIZE="5G" # You can adjust this if needed
BRIDGE="V10"
IMAGES_DIR="/var/lib/vz/template/iso" # Common image directory
@HafizAhmadJamil
HafizAhmadJamil / ohmyzsh.md
Last active April 29, 2024 12:20
Install OhMyZsh

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@HafizAhmadJamil
HafizAhmadJamil / install.sh
Created January 3, 2024 00:23
nerd-fonts-installer
#!/bin/bash
# Select the Nerd Font from https://www.nerdfonts.com/font-downloads
# Testing with ShellCheck
echo "[-] Download The Nerd fonts [-]"
echo "#######################"
echo "Select Nerd Font"
fons_list=("Agave" "AnonymousPro" "Arimo" "AurulentSansMono" "BigBlueTerminal" "BitstreamVeraSansMono" "CascadiaCode" "CodeNewRoman" "ComicShannsMono" "Cousine" "DaddyTimeMono" "DejaVuSansMono" "FantasqueSansMono" "FiraCode" "FiraMono" "Gohu" "Go-Mono" "Hack" "Hasklig" "HeavyData" "Hermit" "iA-Writer" "IBMPlexMono" "InconsolataGo" "InconsolataLGC" "Inconsolata" "IosevkaTerm" "JetBrainsMono" "Lekton" "LiberationMono" "Lilex" "Meslo" "Monofur" "Monoid" "Mononoki" "MPlus" "NerdFontsSymbolsOnly" "Noto" "OpenDyslexic" "Overpass" "ProFont" "ProggyClean" "RobotoMono" "ShareTechMono" "SourceCodePro" "SpaceMono" "Terminus" "Tinos" "UbuntuMono" "Ubuntu" "VictorMono")
PS3="Enter a number: "
select font_name in "${fons_list[@]}" "Quit";
@HafizAhmadJamil
HafizAhmadJamil / ubuntuTemplate.sh
Last active September 29, 2024 09:50
Create Ubuntu Cloud Init Template with Guest tools installed
#!/bin/bash
# Function to prompt for password
prompt_for_password() {
read -s -p "Enter root password for the image: " ROOT_PASSWORD
echo
}
# Check for existing image
if [ -f "noble-server-cloudimg-amd64.img" ] || [ -f "$HOME/noble-server-cloudimg-amd64.img" ]; then