Skip to content

Instantly share code, notes, and snippets.

View dsaad68's full-sized avatar
💭
I play with 🦙

Daniel Saad dsaad68

💭
I play with 🦙
View GitHub Profile
@dsaad68
dsaad68 / sgrep.md
Created November 21, 2025 17:53
Structured Grep with Context

sgrep - Structured Grep with Context

Description

sgrep is a bash function that searches for patterns in files matching a specific path pattern and returns results with configurable context lines. It first lists all files matching the path pattern, then performs the search using ripgrep with syntax highlighting and line numbers.

For AI Agents:

This tool searches codebases for specific patterns within filtered file paths. 
@dsaad68
dsaad68 / gitignore.sh
Created October 29, 2025 07:47
global gitignore for all repos
git config --global core.excludesfile ~/.gitignore_global
echo .DS_Store >> ~/.gitignore_global
@dsaad68
dsaad68 / work-tree-cheatsheet.md
Last active December 2, 2025 09:38
Git Work Tree

Git Worktree Cheat Sheet (my-repo / my-feature layout)

Assumptions

  • All repos live in ~/GitHub/
  • You always start inside a repo: pwd = ~/GitHub/my-repo
  • Create worktrees as siblings (e.g., ../my-repo--my-feature) — never nested inside my-repo/

@dsaad68
dsaad68 / config
Created August 18, 2025 12:11
Ghostty Config
font-family = FiraCode Nerd Font Mono
font-style = Retina
font-thicken = false
font-size = 16
background = #111111
background-opacity = 0.85
unfocused-split-opacity=0.5
@dsaad68
dsaad68 / auto_source_env.sh
Created February 12, 2025 11:52
Python Env Auto Activator
## Python Enviornment Activation
alias activate-venv='source .venv/bin/activate'
# Function to source .venv if it exists
auto_source_env() {
if [[ -d ".venv" && -f ".venv/bin/activate" ]]; then
echo "Activating virtual environment in .venv..."
activate-venv
fi
}
@dsaad68
dsaad68 / fix.md
Last active December 20, 2024 14:10
VSCode `tqdm` fix

How to fix TqdmWarning: IProgress not found problem

  1. Install Jupyter Notebook Renderers
  2. uv add --dev -U ipywidgets jupyterlab ipykernel
  3. python -m ipykernel install --user --name=".venv"
@dsaad68
dsaad68 / hide-desktop-icons.ahk
Created March 5, 2024 12:31
Hide Desktop Icons with Auto Hotkey
#Requires AutoHotkey 2.0+
#SingleInstance Force
#HotIf WinActive("ahk_class Progman") || WinActive("ahk_class WorkerW")
^+d::DesktopIcons()
#HotIf
DesktopIcons(){
hProgman:=WinExist("ahk_class WorkerW","FolderView")?WinExist():WinExist("ahk_class Progman","FolderView")
hShellDefView:=DllCall("user32.dll\GetWindow","ptr",hProgman,"int",5,"ptr")
@dsaad68
dsaad68 / ssh.md
Last active March 5, 2024 12:32
Windows OpenSSH Equivalent of ssh-copy-id
  1. Generate an SSH Key
ssh-keygen
  1. Create .ssh dir on remote
mkdir ~/.ssh/
@dsaad68
dsaad68 / ngrok.md
Created October 3, 2023 21:34
ngrok

how to ngrok with custom domain

ngrok.exe http http://localhost:7071 --domain=warm-severely-boxer.ngrok-free.app

@dsaad68
dsaad68 / How-to-Arch-WSL.md
Created September 29, 2023 17:23
Install Arch Linux as WSL

1. Install SCoop in the PowerShell

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm get.scoop.sh | iex

2. Install using Scoop

scoop bucket add extras 
scoop install archwsl