Skip to content

Instantly share code, notes, and snippets.

View Thavarshan's full-sized avatar
🎯
Focusing

Jerome Thayananthajothy Thavarshan

🎯
Focusing
View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
# Microsoft Office / OneDrive / Teams full removal script for macOS (Apple Silicon compatible)
# Usage:
# sudo ./remove_microsoft_office.sh --dry-run # preview actions
# sudo ./remove_microsoft_office.sh # actually delete
DRY_RUN=0
[[ "${1:-}" == "--dry-run" || "${1:-}" == "-n" ]] && DRY_RUN=1
@Thavarshan
Thavarshan / myip.sh
Created February 12, 2025 03:55
This function fetches your public IP using https://api.ipify.org, displays it, and copies it to the clipboard if possible. It supports macOS (pbcopy), Linux with xclip, and Linux with xsel. 🚀
myip() {
local ip=$(curl -s https://api.ipify.org) # Fetch IPv4 address
echo "Your public IP (IPv4) is: $ip"
# Copy to clipboard based on OS
if command -v pbcopy &>/dev/null; then
echo -n "$ip" | pbcopy # macOS
echo "Copied to clipboard!"
elif command -v xclip &>/dev/null; then
echo -n "$ip" | xclip -selection clipboard # Linux with xclip
@Thavarshan
Thavarshan / sublime-text-3-setup.md
Last active July 26, 2021 09:57 — forked from ijy/sublime-text-3-setup.md
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following: