Skip to content

Instantly share code, notes, and snippets.

View zaherg's full-sized avatar
🤖
Roboting

Zaher Ghaibeh zaherg

🤖
Roboting
View GitHub Profile
{
"apiVersion": "dashboard.grafana.app/v2beta1",
"kind": "Dashboard",
"metadata": {
"name": "claude-code-metrics",
"generation": 12,
"creationTimestamp": "2025-12-10T13:33:56Z",
"labels": {},
"annotations": {}
},
name memory-profiler
description Memory profiling specialist for identifying leaks, inefficiencies, and optimization opportunities. Use proactively to analyze memory usage patterns during actual code execution.
tools Bash, Read, Grep, Glob
model sonnet
color green

You are a memory optimization expert specializing in identifying and resolving memory issues through comprehensive profiling.

@zaherg
zaherg / pg_backup.sh
Created August 19, 2025 19:19 — forked from ethicnology/pg_backup.sh
Backup selected (or all) schema from your postgres database
#!/bin/bash
# Configuration
DB_HOST=""
DB_PORT=""
DB_NAME=""
DB_USER=""
DB_PASS=""
DIR=""
DATE=$(date +"%Y%m%d_%H%M%S")
@zaherg
zaherg / readme.md
Created August 17, 2025 17:00 — forked from estysdesu/readme.md
[Kindle 4: Jailbreak and SSH] #kindle #ssh #jailbreak

Following this guide: https://wiki.mobileread.com/wiki/Kindle4NTHacking#SSH.
Using Kindle 4.1 and macOS 10.14.

  1. Connect the Kindle. It should be recognized as a USB Mass Storage Device.
  2. Download the jailbreak archive
  3. Copy data.tar.gz, ENABLE_DIAGS, and diagnostic_logs to the Kindle folder.
  4. Restart the Kindle into Diagnostics Mode.
  5. Reboot the Kindle from the Diagnostics Mode. Reboot screen should show jailbroken screensaver.
@zaherg
zaherg / proxyman.php
Last active September 24, 2025 09:02
<?php
/**
* Plugin Name: SSL Verification Control
* Description: Disables SSL verification for development and proxy usage
* Version: 1.0.0
* Author: Dev Team
*/
// Prevent direct access
@zaherg
zaherg / 00 - Cursor AI Prompting Rules.md
Created June 10, 2025 11:21 — forked from aashari/00 - Cursor AI Prompting Rules.md
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework — Usage Guide

This guide shows you how to apply the three structured prompt templates—core.md, refresh.md, and request.md—to get consistently reliable, autonomous, and high-quality assistance from Cursor AI.


1. Core Rules (core.md)

Purpose:
Defines the AI’s always-on operating principles: when to proceed autonomously, how to research with tools, when to ask for confirmation, and how to self-validate.

function gas() {
local repo_dir branch owner repo api_url gh_status conclusion color
# Ensure GITHUB_TOKEN is set
if [[ -z "$GITHUB_TOKEN" ]]; then
echo "❌ GITHUB_TOKEN is not set. Export it in your shell environment."
return 1
fi
# Find the Git repo root
@zaherg
zaherg / settings.json
Created November 16, 2024 15:21 — forked from danielroe/extensions.json
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",
@zaherg
zaherg / firewall.sh
Created October 30, 2024 13:56 — forked from andrasbacsai/firewall.sh
Update a Hetzner Firewall rule with your IP address
#!/bin/bash
# Script to update a firewall rule in a Hetzner Firewall with your current IP address.
# Good if you would like to restrict SSH access only for your current IP address (secure).
#################
# WARNING: This script will overwrite all rules in the firewall rules, so make sure you
# added all the required rules.
# I use a separate firewall rule just for SSH access.
#################
@zaherg
zaherg / set-up-persistent-storage-for-K3s.md
Created October 19, 2024 09:27 — forked from ericboehs/set-up-persistent-storage-for-K3s.md
Set up persistent storage for K3s (via USB drive)

Set up persistent storage for K3s (via USB drive)

  1. Get root: ssh pi-k3s-master.local -t sudo su
  2. Find your disk via fdisk -l (e.g. /dev/sda1)
  3. Erase drive by repartitioning: mkfs.ext4 /dev/sda1
  4. Mount drive:
    mkdir /mnt/pi-k3s-storage
    chown -R ericboehs:ericboehs /mnt/pi-k3s-storage
    mount /dev/sda1 /mnt/pi-k3s-storage