Skip to content

Instantly share code, notes, and snippets.

View maddada's full-sized avatar

Mohamad Yahia maddada

View GitHub Profile
@maddada
maddada / setting-default-editor-for-claude-code.md
Last active January 7, 2026 01:09
Setting Default Editor for Claude Code

To set the default editor in Mac, Linux, Windows:

1. 🖥️ macOS (Default: Zsh)

On a modern macOS system, the default shell is Zsh.

  • File: ~/.zshrc (This file is in your home directory. The ~ is a shortcut for /Users/yourusername).
  • How to Edit:
    1. Open your terminal.
  1. Type nano ~/.zshrc to open the file in a terminal editor.
@maddada
maddada / gist:865364f5be840a20311f88ba43d84fd2
Created August 4, 2025 18:25
Goal: Organize my tabs into groups
Goal: Organize my tabs into groups
Here is a list of ungrouped tabs provided in the following format:
id ||| title ||| url
<tabs_list>
${tabs.map((t) => `${t.id} ||| ${t.title} ||| ${t.url}`).join("\n")}
</tabs_list>
Please adhere strictly to the following rules:
@maddada
maddada / gist:b7198f71181db2e2810d8234f5a9781e
Created June 26, 2025 04:31
2025-06-26 My clipdiary config
[Options]
ConfigOK=1
AlwaysOnTop=0
IncrementalSearch=1
HideWindowAfter=0
CollapseTreeAfterPasting=1
UseShortcutsSN=1
UseShortcutsCH=1
CurrentTabNumber=0
HotKeysList=1,0,0;2,6,81;3,6,65;4,7,86;5,0,0;6,2,192;7,0,0;8,0,0;9,0,0;10,0,0;11,0,0;
@maddada
maddada / gist:3debffa1acdbd4cbaeba78672268687f
Created June 26, 2025 04:10
2025-06-26 No OSD with better display
plutil -p ~/Desktop/BetterDisplay.plist
{
"activationPriority@DisplayGroup:-1001" => 0
"additionalXDRDisplaySettings@Display:2" => 1
"airPlay@Display:2" => 0
"airPlay@Display:3" => 0
"airPlay@Display:8" => 0
"airPlay@Display:18" => 0
"airPlay@Display:19" => 0
"allowDDC@Display:8" => 0
@maddada
maddada / sharp-tabs-tweakcn-theme.css
Last active June 24, 2025 03:09
Example tweakcn.com theme (tailwind v3) applied on Sharp Tabs
/*
# Easy steps for sample theme (recommended first):
# To try this sample custom tweakcn theme, just copy the all of the contents of this file and paste them in the Custom CSS field in Sharp Tab's settings.
===========
# Complete steps for custom theme:
#!/usr/bin/env node
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @lightSyntaxTransform
* @noflow
@maddada
maddada / algorithm related methods.ts
Last active November 16, 2021 04:03
Useful JS Methods
@maddada
maddada / gist:65767ea95921d25bd3c3779f41aca477
Created February 5, 2020 12:24
2020-02-05 SharePoint REST using Fiddler
==========================================================
// GET for web:
GET https://shortpoint2.sharepoint.com/sites/Test1/_api/web HTTP/1.1
Host: shortpoint2.sharepoint.com
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
Cookie: rtFa=ZNAwY8p1QOWC7IjAVAxVRJJnsxQpKUm3Zd75bNv1BxsmOEUwQkNDOTItMTVEOS00OTcwLUI5MTktQjMyMjcwMEExNTMxm7Y3txsPDMnVTCDVeLJoRWVLqc15xQ6gFkcMLSWCZf1AGxgwCQKn/zKArsCP/0/5HLDvAC1VEGFlbsoWIsU4+NIM8Mhzy52OqxdGESxxeWxm4hnxrssF9tsf/YYAINLTpjlkexw0ShZ1/DIjcGxDlEz36kUJZ8ezxvbPa/U0e3D/KJvt+nlbEu6BubvsovJHagrFxPqa2oiLlr47iDQ/ltPmbuqjIsvcf4g7kA8nvMGMYNKH8QLZtPnFMxvr12MT42x5if/e8UOfyEy7A9LQJdHKtrPGNCoVkez2S7srCpTAs8EbCtqg86iA2kz0jIg7AtOlwnVMJ2cEOCUttnGK/kUAAAA=;FedAuth=77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48U1A+VjYsMGguZnxtZW1iZXJzaGlwfDEwMDMyMDAwOTkzMTc3Y2ZAbGl2ZS5jb20sMCMuZnxtZW1iZXJzaGlwfG15b3Vzc2VmQHNob3J0cG9pbnQyLm9ubWljcm9zb2Z0LmNvbSwxMzIyNTE5NjQwODAwMDAwMDAsMTMyMjUxOTU5MjIwMDAwMDAwLDEzMjI1Mzc5MDgzNTc0NTg3Niw5Mi45Ni4xOTQuMTA5LDIsOGUwYmNjOTItM