# filename: ~/.bashrc
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# filename: ~/.bashrc
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# filename: ~/.bashrc
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# filename: ~/.bashrc
alias -='cd -'
# filename: ~/.bashrc
alias -='cd -'
# filename: ~/.bashrc
alias -='cd -'
# filename: ~/.bashrc
alias gs='-weight: 500;">git -weight: 500;">status'
alias ga='-weight: 500;">git add'
alias gc='-weight: 500;">git commit'
alias gp='-weight: 500;">git push'
alias gl='-weight: 500;">git log --oneline --graph -20'
alias gd='-weight: 500;">git diff'
# filename: ~/.bashrc
alias gs='-weight: 500;">git -weight: 500;">status'
alias ga='-weight: 500;">git add'
alias gc='-weight: 500;">git commit'
alias gp='-weight: 500;">git push'
alias gl='-weight: 500;">git log --oneline --graph -20'
alias gd='-weight: 500;">git diff'
# filename: ~/.bashrc
alias gs='-weight: 500;">git -weight: 500;">status'
alias ga='-weight: 500;">git add'
alias gc='-weight: 500;">git commit'
alias gp='-weight: 500;">git push'
alias gl='-weight: 500;">git log --oneline --graph -20'
alias gd='-weight: 500;">git diff'
* 4a2b8c3 (HEAD -> main) Fix login validation
* 9c1e4d2 Add user profile page
| * 7f3a9b2 (feature/oauth) Implement OAuth flow
|/
* 3d8c7a1 Update dependencies
* 4a2b8c3 (HEAD -> main) Fix login validation
* 9c1e4d2 Add user profile page
| * 7f3a9b2 (feature/oauth) Implement OAuth flow
|/
* 3d8c7a1 Update dependencies
* 4a2b8c3 (HEAD -> main) Fix login validation
* 9c1e4d2 Add user profile page
| * 7f3a9b2 (feature/oauth) Implement OAuth flow
|/
* 3d8c7a1 Update dependencies
# filename: ~/.bashrc
alias hg='history | grep'
# filename: ~/.bashrc
alias hg='history | grep'
# filename: ~/.bashrc
alias hg='history | grep'
# filename: ~/.bashrc
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# filename: ~/.bashrc
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# filename: ~/.bashrc
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# filename: ~/.bashrc
alias ls='ls --color=auto -F'
alias ll='ls -la'
alias la='ls -A'
# filename: ~/.bashrc
alias ls='ls --color=auto -F'
alias ll='ls -la'
alias la='ls -A'
# filename: ~/.bashrc
alias ls='ls --color=auto -F'
alias ll='ls -la'
alias la='ls -A'
# filename: ~/.bashrc
alias lsn='ls -lv' # natural sort (1, 2, 10 instead of 1, 10, 2)
# filename: ~/.bashrc
alias lsn='ls -lv' # natural sort (1, 2, 10 instead of 1, 10, 2)
# filename: ~/.bashrc
alias lsn='ls -lv' # natural sort (1, 2, 10 instead of 1, 10, 2)
# filename: ~/.bashrc
alias bashconfig='${EDITOR:-vim} ~/.bashrc'
alias zshconfig='${EDITOR:-vim} ~/.zshrc'
alias reload='source ~/.bashrc'
# filename: ~/.bashrc
alias bashconfig='${EDITOR:-vim} ~/.bashrc'
alias zshconfig='${EDITOR:-vim} ~/.zshrc'
alias reload='source ~/.bashrc'
# filename: ~/.bashrc
alias bashconfig='${EDITOR:-vim} ~/.bashrc'
alias zshconfig='${EDITOR:-vim} ~/.zshrc'
alias reload='source ~/.bashrc'
# filename: ~/.bashrc
alias pg='ps aux | grep -v grep | grep -i'
# filename: ~/.bashrc
alias pg='ps aux | grep -v grep | grep -i'
# filename: ~/.bashrc
alias pg='ps aux | grep -v grep | grep -i'
# filename: ~/.bashrc
alias port='netstat -tuln | grep'
# filename: ~/.bashrc
alias port='netstat -tuln | grep'
# filename: ~/.bashrc
alias port='netstat -tuln | grep'
# filename: ~/.bashrc
alias untar='tar -xvf'
# filename: ~/.bashrc
alias untar='tar -xvf'
# filename: ~/.bashrc
alias untar='tar -xvf'
# filename: ~/.bashrc
tardir() { tar -czf "${1%/}.tar.gz" "$1"
}
# filename: ~/.bashrc
tardir() { tar -czf "${1%/}.tar.gz" "$1"
}
# filename: ~/.bashrc
tardir() { tar -czf "${1%/}.tar.gz" "$1"
}
# Compare directory listings without temp files
diff <(ls dir1) <(ls dir2) # Process command output with a tool that expects files
comm -12 <(sort file1.txt) <(sort file2.txt) # Write to multiple places: tee with process substitution
cat file.txt | tee >(wc -l > linecount.txt) | grep "pattern" # Use process substitution with while loops (avoids subshell issues)
while read line; do echo "Processing: $line"
done < <(cat file.txt)
# Compare directory listings without temp files
diff <(ls dir1) <(ls dir2) # Process command output with a tool that expects files
comm -12 <(sort file1.txt) <(sort file2.txt) # Write to multiple places: tee with process substitution
cat file.txt | tee >(wc -l > linecount.txt) | grep "pattern" # Use process substitution with while loops (avoids subshell issues)
while read line; do echo "Processing: $line"
done < <(cat file.txt)
# Compare directory listings without temp files
diff <(ls dir1) <(ls dir2) # Process command output with a tool that expects files
comm -12 <(sort file1.txt) <(sort file2.txt) # Write to multiple places: tee with process substitution
cat file.txt | tee >(wc -l > linecount.txt) | grep "pattern" # Use process substitution with while loops (avoids subshell issues)
while read line; do echo "Processing: $line"
done < <(cat file.txt)
# filename: ~/.bashrc
# Create a directory and cd into it
mkcd() { mkdir -p "$1" && cd "$1"
} # Extract any archive without remembering flags
extract() { if [ -f "$1" ]; then case "$1" in *.tar.bz2) tar -xjf "$1" ;; *.tar.gz) tar -xzf "$1" ;; *.tar.xz) tar -xJf "$1" ;; *.bz2) bunzip2 "$1" ;; *.rar) unrar x "$1" ;; *.gz) gunzip "$1" ;; *.tar) tar -xf "$1" ;; *.tbz2) tar -xjf "$1" ;; *.tgz) tar -xzf "$1" ;; *.zip) unzip "$1" ;; *.Z) uncompress "$1" ;; *.7z) 7z x "$1" ;; *) echo "Unknown archive: $1" ;; esac else echo "'$1' is not a valid file" fi
} # Find and edit files with fuzzy matching
fe() { local files IFS=$'\n' files=($(fzf --query="$1" --multi --select-1 --exit-0)) [[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}"
} # Quick HTTP server with optional port
serve() { local port="${1:-8000}" python3 -m http.server "$port"
} # Create a backup of a file with timestamp
backup() { cp "$1" "${1}.$(date +%Y%m%d_%H%M%S).bak"
}
# filename: ~/.bashrc
# Create a directory and cd into it
mkcd() { mkdir -p "$1" && cd "$1"
} # Extract any archive without remembering flags
extract() { if [ -f "$1" ]; then case "$1" in *.tar.bz2) tar -xjf "$1" ;; *.tar.gz) tar -xzf "$1" ;; *.tar.xz) tar -xJf "$1" ;; *.bz2) bunzip2 "$1" ;; *.rar) unrar x "$1" ;; *.gz) gunzip "$1" ;; *.tar) tar -xf "$1" ;; *.tbz2) tar -xjf "$1" ;; *.tgz) tar -xzf "$1" ;; *.zip) unzip "$1" ;; *.Z) uncompress "$1" ;; *.7z) 7z x "$1" ;; *) echo "Unknown archive: $1" ;; esac else echo "'$1' is not a valid file" fi
} # Find and edit files with fuzzy matching
fe() { local files IFS=$'\n' files=($(fzf --query="$1" --multi --select-1 --exit-0)) [[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}"
} # Quick HTTP server with optional port
serve() { local port="${1:-8000}" python3 -m http.server "$port"
} # Create a backup of a file with timestamp
backup() { cp "$1" "${1}.$(date +%Y%m%d_%H%M%S).bak"
}
# filename: ~/.bashrc
# Create a directory and cd into it
mkcd() { mkdir -p "$1" && cd "$1"
} # Extract any archive without remembering flags
extract() { if [ -f "$1" ]; then case "$1" in *.tar.bz2) tar -xjf "$1" ;; *.tar.gz) tar -xzf "$1" ;; *.tar.xz) tar -xJf "$1" ;; *.bz2) bunzip2 "$1" ;; *.rar) unrar x "$1" ;; *.gz) gunzip "$1" ;; *.tar) tar -xf "$1" ;; *.tbz2) tar -xjf "$1" ;; *.tgz) tar -xzf "$1" ;; *.zip) unzip "$1" ;; *.Z) uncompress "$1" ;; *.7z) 7z x "$1" ;; *) echo "Unknown archive: $1" ;; esac else echo "'$1' is not a valid file" fi
} # Find and edit files with fuzzy matching
fe() { local files IFS=$'\n' files=($(fzf --query="$1" --multi --select-1 --exit-0)) [[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}"
} # Quick HTTP server with optional port
serve() { local port="${1:-8000}" python3 -m http.server "$port"
} # Create a backup of a file with timestamp
backup() { cp "$1" "${1}.$(date +%Y%m%d_%H%M%S).bak"
}
# filename: ~/.bashrc
# Kill processes with fuzzy search
fkill() { local pid pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') if [ -n "$pid" ]; then echo "Killing $pid..." echo "$pid" | xargs kill -9 fi
} # Checkout -weight: 500;">git branches with fuzzy search
fbr() { local branches branch branches=$(-weight: 500;">git branch -a | grep -v HEAD) && branch=$(echo "$branches" | fzf) && -weight: 500;">git checkout "$(echo "$branch" | sed 's/.* //' | sed 's#remotes/[^/]*/##')"
}
# filename: ~/.bashrc
# Kill processes with fuzzy search
fkill() { local pid pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') if [ -n "$pid" ]; then echo "Killing $pid..." echo "$pid" | xargs kill -9 fi
} # Checkout -weight: 500;">git branches with fuzzy search
fbr() { local branches branch branches=$(-weight: 500;">git branch -a | grep -v HEAD) && branch=$(echo "$branches" | fzf) && -weight: 500;">git checkout "$(echo "$branch" | sed 's/.* //' | sed 's#remotes/[^/]*/##')"
}
# filename: ~/.bashrc
# Kill processes with fuzzy search
fkill() { local pid pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') if [ -n "$pid" ]; then echo "Killing $pid..." echo "$pid" | xargs kill -9 fi
} # Checkout -weight: 500;">git branches with fuzzy search
fbr() { local branches branch branches=$(-weight: 500;">git branch -a | grep -v HEAD) && branch=$(echo "$branches" | fzf) && -weight: 500;">git checkout "$(echo "$branch" | sed 's/.* //' | sed 's#remotes/[^/]*/##')"
}
# Find large files
du -h --max-depth=1 | sort -h # Watch a file for changes (useful for logs)
watch -n 1 'tail -20 /var/log/nginx/error.log' # Create a quick timestamp
date +%Y%m%d_%H%M%S # Find empty directories
find . -type d -empty # Rename with substitution (requires renameutils)
qmv -f do *
# Find large files
du -h --max-depth=1 | sort -h # Watch a file for changes (useful for logs)
watch -n 1 'tail -20 /var/log/nginx/error.log' # Create a quick timestamp
date +%Y%m%d_%H%M%S # Find empty directories
find . -type d -empty # Rename with substitution (requires renameutils)
qmv -f do *
# Find large files
du -h --max-depth=1 | sort -h # Watch a file for changes (useful for logs)
watch -n 1 'tail -20 /var/log/nginx/error.log' # Create a quick timestamp
date +%Y%m%d_%H%M%S # Find empty directories
find . -type d -empty # Rename with substitution (requires renameutils)
qmv -f do *
# filename: ~/.bashrc
# Attach to existing session or create new one
ta() { if [ -z "$1" ]; then # No argument - attach to most recent or create default tmux new-session -A -s main else # Attach to named session or create it tmux new-session -A -s "$1" fi
} # List sessions with fuzzy select to attach
tl() { local session session=$(tmux list-sessions -F "#S" 2>/dev/null | fzf --select-1 --exit-0) [ -n "$session" ] && tmux attach -t "$session"
} # Kill a session by name
tk() { if [ -z "$1" ]; then local session session=$(tmux list-sessions -F "#S" 2>/dev/null | fzf -m) [ -n "$session" ] && tmux kill-session -t "$session" else tmux kill-session -t "$1" fi
} # Create a new session with current directory name
tn() { local session_name="${1:-$(basename "$PWD")}" tmux new-session -d -s "$session_name" 2>/dev/null || true tmux attach -t "$session_name"
}
# filename: ~/.bashrc
# Attach to existing session or create new one
ta() { if [ -z "$1" ]; then # No argument - attach to most recent or create default tmux new-session -A -s main else # Attach to named session or create it tmux new-session -A -s "$1" fi
} # List sessions with fuzzy select to attach
tl() { local session session=$(tmux list-sessions -F "#S" 2>/dev/null | fzf --select-1 --exit-0) [ -n "$session" ] && tmux attach -t "$session"
} # Kill a session by name
tk() { if [ -z "$1" ]; then local session session=$(tmux list-sessions -F "#S" 2>/dev/null | fzf -m) [ -n "$session" ] && tmux kill-session -t "$session" else tmux kill-session -t "$1" fi
} # Create a new session with current directory name
tn() { local session_name="${1:-$(basename "$PWD")}" tmux new-session -d -s "$session_name" 2>/dev/null || true tmux attach -t "$session_name"
}
# filename: ~/.bashrc
# Attach to existing session or create new one
ta() { if [ -z "$1" ]; then # No argument - attach to most recent or create default tmux new-session -A -s main else # Attach to named session or create it tmux new-session -A -s "$1" fi
} # List sessions with fuzzy select to attach
tl() { local session session=$(tmux list-sessions -F "#S" 2>/dev/null | fzf --select-1 --exit-0) [ -n "$session" ] && tmux attach -t "$session"
} # Kill a session by name
tk() { if [ -z "$1" ]; then local session session=$(tmux list-sessions -F "#S" 2>/dev/null | fzf -m) [ -n "$session" ] && tmux kill-session -t "$session" else tmux kill-session -t "$1" fi
} # Create a new session with current directory name
tn() { local session_name="${1:-$(basename "$PWD")}" tmux new-session -d -s "$session_name" 2>/dev/null || true tmux attach -t "$session_name"
}
unbind C-b
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# filename: ~/.bashrc
diskalert() { local threshold="${1:-80}" local usage df -h | awk 'NR>1 { gsub(/%/,"",$5) if ($5 > threshold) { print "WARNING: " $6 " is at " $5 "% capacity (" $3 " used of " $2 ")" } }' threshold="$threshold"
}
# filename: ~/.bashrc
diskalert() { local threshold="${1:-80}" local usage df -h | awk 'NR>1 { gsub(/%/,"",$5) if ($5 > threshold) { print "WARNING: " $6 " is at " $5 "% capacity (" $3 " used of " $2 ")" } }' threshold="$threshold"
}
# filename: ~/.bashrc
diskalert() { local threshold="${1:-80}" local usage df -h | awk 'NR>1 { gsub(/%/,"",$5) if ($5 > threshold) { print "WARNING: " $6 " is at " $5 "% capacity (" $3 " used of " $2 ")" } }' threshold="$threshold"
}
WARNING: /var/log is at 94% capacity (8.2G used of 8.8G)
WARNING: /home is at 87% capacity (42G used of 49G)
WARNING: /var/log is at 94% capacity (8.2G used of 8.8G)
WARNING: /home is at 87% capacity (42G used of 49G)
WARNING: /var/log is at 94% capacity (8.2G used of 8.8G)
WARNING: /home is at 87% capacity (42G used of 49G)
# filename: ~/.bashrc
pgdump() { local db_name="$1" local backup_dir="${2:-./backups}" local timestamp timestamp=$(date +%Y%m%d_%H%M%S) if [ -z "$db_name" ]; then echo "Usage: pgdump <database_name> [backup_directory]" echo "Available databases:" psql -l | grep "^\s\+\w" | grep -v "List\|Name" | awk '{print $1}' return 1 fi mkdir -p "$backup_dir" local outfile="${backup_dir}/${db_name}_${timestamp}.dump" echo "Dumping '$db_name' to $outfile..." if pg_dump -Fc -f "$outfile" "$db_name"; then echo "Backup complete: $(ls -lh "$outfile" | awk '{print $5}')" else echo "Backup failed. Check that database '$db_name' exists and you have permissions." rm -f "$outfile" return 1 fi
}
# filename: ~/.bashrc
pgdump() { local db_name="$1" local backup_dir="${2:-./backups}" local timestamp timestamp=$(date +%Y%m%d_%H%M%S) if [ -z "$db_name" ]; then echo "Usage: pgdump <database_name> [backup_directory]" echo "Available databases:" psql -l | grep "^\s\+\w" | grep -v "List\|Name" | awk '{print $1}' return 1 fi mkdir -p "$backup_dir" local outfile="${backup_dir}/${db_name}_${timestamp}.dump" echo "Dumping '$db_name' to $outfile..." if pg_dump -Fc -f "$outfile" "$db_name"; then echo "Backup complete: $(ls -lh "$outfile" | awk '{print $5}')" else echo "Backup failed. Check that database '$db_name' exists and you have permissions." rm -f "$outfile" return 1 fi
}
# filename: ~/.bashrc
pgdump() { local db_name="$1" local backup_dir="${2:-./backups}" local timestamp timestamp=$(date +%Y%m%d_%H%M%S) if [ -z "$db_name" ]; then echo "Usage: pgdump <database_name> [backup_directory]" echo "Available databases:" psql -l | grep "^\s\+\w" | grep -v "List\|Name" | awk '{print $1}' return 1 fi mkdir -p "$backup_dir" local outfile="${backup_dir}/${db_name}_${timestamp}.dump" echo "Dumping '$db_name' to $outfile..." if pg_dump -Fc -f "$outfile" "$db_name"; then echo "Backup complete: $(ls -lh "$outfile" | awk '{print $5}')" else echo "Backup failed. Check that database '$db_name' exists and you have permissions." rm -f "$outfile" return 1 fi
}
# filename: ~/.bashrc
allcron() { echo "=== System crontab ===" if [ -r /etc/crontab ]; then cat /etc/crontab | grep -v '^#' | grep -v '^$' else echo "Cannot read system crontab" fi echo -e "\n=== User crontabs ===" for user in $(cut -d: -f1 /etc/passwd); do local crons crons=$(crontab -u "$user" -l 2>/dev/null | grep -v '^#' | grep -v '^$') if [ -n "$crons" ]; then echo -e "\n[$user]" echo "$crons" fi done echo -e "\n=== Cron directories ===" for dir in /etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.weekly /etc/cron.monthly; do if [ -d "$dir" ] && [ "$(ls -A "$dir" 2>/dev/null)" ]; then echo -e "\n[$dir]" ls -la "$dir" | tail -n +4 fi done
}
# filename: ~/.bashrc
allcron() { echo "=== System crontab ===" if [ -r /etc/crontab ]; then cat /etc/crontab | grep -v '^#' | grep -v '^$' else echo "Cannot read system crontab" fi echo -e "\n=== User crontabs ===" for user in $(cut -d: -f1 /etc/passwd); do local crons crons=$(crontab -u "$user" -l 2>/dev/null | grep -v '^#' | grep -v '^$') if [ -n "$crons" ]; then echo -e "\n[$user]" echo "$crons" fi done echo -e "\n=== Cron directories ===" for dir in /etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.weekly /etc/cron.monthly; do if [ -d "$dir" ] && [ "$(ls -A "$dir" 2>/dev/null)" ]; then echo -e "\n[$dir]" ls -la "$dir" | tail -n +4 fi done
}
# filename: ~/.bashrc
allcron() { echo "=== System crontab ===" if [ -r /etc/crontab ]; then cat /etc/crontab | grep -v '^#' | grep -v '^$' else echo "Cannot read system crontab" fi echo -e "\n=== User crontabs ===" for user in $(cut -d: -f1 /etc/passwd); do local crons crons=$(crontab -u "$user" -l 2>/dev/null | grep -v '^#' | grep -v '^$') if [ -n "$crons" ]; then echo -e "\n[$user]" echo "$crons" fi done echo -e "\n=== Cron directories ===" for dir in /etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.weekly /etc/cron.monthly; do if [ -d "$dir" ] && [ "$(ls -A "$dir" 2>/dev/null)" ]; then echo -e "\n[$dir]" ls -la "$dir" | tail -n +4 fi done
}
# filename: ~/.bashrc
copy() { local input="${1:-$(cat)}" if command -v pbcopy &>/dev/null; then echo -n "$input" | pbcopy elif command -v wl-copy &>/dev/null; then echo -n "$input" | wl-copy elif command -v xclip &>/dev/null; then echo -n "$input" | xclip -selection clipboard elif command -v xsel &>/dev/null; then echo -n "$input" | xsel --clipboard --input else echo "No clipboard utility found. Install wl-copy, xclip, or xsel." >&2 return 1 fi
}
# filename: ~/.bashrc
copy() { local input="${1:-$(cat)}" if command -v pbcopy &>/dev/null; then echo -n "$input" | pbcopy elif command -v wl-copy &>/dev/null; then echo -n "$input" | wl-copy elif command -v xclip &>/dev/null; then echo -n "$input" | xclip -selection clipboard elif command -v xsel &>/dev/null; then echo -n "$input" | xsel --clipboard --input else echo "No clipboard utility found. Install wl-copy, xclip, or xsel." >&2 return 1 fi
}
# filename: ~/.bashrc
copy() { local input="${1:-$(cat)}" if command -v pbcopy &>/dev/null; then echo -n "$input" | pbcopy elif command -v wl-copy &>/dev/null; then echo -n "$input" | wl-copy elif command -v xclip &>/dev/null; then echo -n "$input" | xclip -selection clipboard elif command -v xsel &>/dev/null; then echo -n "$input" | xsel --clipboard --input else echo "No clipboard utility found. Install wl-copy, xclip, or xsel." >&2 return 1 fi
}
# Copy file contents
cat ~/.ssh/id_rsa.pub | copy # Copy command output
copy "$(pwd)" # Copy with argument directly
copy "some text to clipboard"
# Copy file contents
cat ~/.ssh/id_rsa.pub | copy # Copy command output
copy "$(pwd)" # Copy with argument directly
copy "some text to clipboard"
# Copy file contents
cat ~/.ssh/id_rsa.pub | copy # Copy command output
copy "$(pwd)" # Copy with argument directly
copy "some text to clipboard"
# filename: ~/.bashrc
myip() { -weight: 500;">curl -s https://ipinfo.io/ip
} ips() { ip -br -c addr show
} ports() { local port="$1" if [ -n "$port" ]; then ss -tlnp | grep ":$port" else ss -tlnp fi
} dns() { dig +short "$1"
}
# filename: ~/.bashrc
myip() { -weight: 500;">curl -s https://ipinfo.io/ip
} ips() { ip -br -c addr show
} ports() { local port="$1" if [ -n "$port" ]; then ss -tlnp | grep ":$port" else ss -tlnp fi
} dns() { dig +short "$1"
}
# filename: ~/.bashrc
myip() { -weight: 500;">curl -s https://ipinfo.io/ip
} ips() { ip -br -c addr show
} ports() { local port="$1" if [ -n "$port" ]; then ss -tlnp | grep ":$port" else ss -tlnp fi
} dns() { dig +short "$1"
}
lo UNKNOWN 127.0.0.1/8 ::1/128
eth0 UP 192.168.1.42/24 fe80::42/64
docker0 DOWN 172.17.0.1/16
lo UNKNOWN 127.0.0.1/8 ::1/128
eth0 UP 192.168.1.42/24 fe80::42/64
docker0 DOWN 172.17.0.1/16
lo UNKNOWN 127.0.0.1/8 ::1/128
eth0 UP 192.168.1.42/24 fe80::42/64
docker0 DOWN 172.17.0.1/16
ports 3000 # Show only what's using port 3000
ports 3000 # Show only what's using port 3000
ports 3000 # Show only what's using port 3000
dns google.com # 142.250.80.46
dns google.com # 142.250.80.46
dns google.com # 142.250.80.46