Skip to content

Instantly share code, notes, and snippets.

View pkdiv's full-sized avatar
🎯
Focusing

Divyesh P K pkdiv

🎯
Focusing
View GitHub Profile
@pkdiv
pkdiv / .zshrc
Created August 8, 2026 18:34
Shell Configs
```zsh
# ~/.zshrc - Cleaned & Optimized
# Command execution time printed RIGHT-ALIGNED between prompts (seconds with ms precision)
# -------------------------------------------------
# 0. REQUIRED MODULES
# -------------------------------------------------
# Needed for $EPOCHREALTIME
@pkdiv
pkdiv / Operators.md
Created March 7, 2026 15:09
Google Fu

Google Search Operators Reference

Operator Description
link:url Shows other pages that link to that URL.
related:url Finds pages that are related to the specified URL.
site:domain Restricts search results to the specific domain.
define:word Provides a definition of the word.
allinurl:terms Shows only pages with all specified terms in the URL.
inurl:term Shows pages where the next term appears in the URL.
# Show a message in the status bar when Prefix is active
set -g status-left " #[fg=green,bold][#S] #{?client_prefix,#[fg=red]ACTIVE ,}"
set -g status-left-length 20
@pkdiv
pkdiv / .tmux.conf
Last active June 2, 2026 14:33
Zsh Files
# Intuitive split keys (v=vertical, h=horizontal)
# -h creates horizontal split (side-by-side)
bind v split-window -h
# -v creates vertical split (top-bottom)
bind h split-window -v
# Alternative: keep the original keys too
# Ctrl+b % still works
bind % split-window -h
# Ctrl+b " still works
@pkdiv
pkdiv / errors.txt
Last active November 8, 2025 18:33
Interesting Computer Things
Zalgo Text
@pkdiv
pkdiv / versa_backup.py
Created September 24, 2025 18:02
Versa Device Backup script
#!/usr/bin/env python3
import paramiko
import time
import socket
import os
backup_path = "/usr/local/rancid/var/SDWAN_backups/"
def device_backup(hostname, username, password, command, timeout):
try:
@pkdiv
pkdiv / GNOME_backup.md
Created June 21, 2025 07:44
Backup GNOME settings and extension

dconf

Backup

dconf dump / > gnome-settings-backup.dconf

Restore

@pkdiv
pkdiv / docker.sh
Last active September 24, 2025 18:03
Docker Container Offline Pull
# Pull Image
docker pull <image-name>
# Save image to tar
docker save -o <filename>.tar <image-name>
# Load image in offline machine
docker load -i <filename>.tar