Skip to content

Instantly share code, notes, and snippets.

View MohamedElashri's full-sized avatar

Mohamed Elashri MohamedElashri

View GitHub Profile
@MohamedElashri
MohamedElashri / install_qwen.md
Last active March 19, 2026 14:37
qwen mcp setup

The official script to install qwen code require root, but we can use this workaround to install qwen code without root.

Follow the steps to install Qwen Code without root, and incorporating the nvm-based Node.js upgrade (because we have very old node version)

Install Qwen Code Without Root

Step 1: Install nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
@MohamedElashri
MohamedElashri / keybase.md
Created February 26, 2026 17:44
keybase.md

Keybase proof

I hereby claim:

  • I am MohamedElashri on github.
  • I am melashri (https://keybase.io/melashri) on keybase.
  • I have a public key whose fingerprint is DC2D BFF9 D7CE 0CD9 5399 268C 41C0 F047 6F11 2C6F

To claim this, I am signing this object:

@MohamedElashri
MohamedElashri / thunderbird_linux_upgrade.md
Last active December 1, 2025 15:16
Automate thunderbird linux update

Mozilla does provide flatback and official Flatpak for thunderbird, but they are always behind release and they usually stick for long time at old versions.

I don't want also to have to check for updates and do them manually on my linux machine. so I wrote this to do automate the process

  1. Create the auto-update script: ~/.local/bin/update-thunderbird
#!/bin/bash
set -euo pipefail
@MohamedElashri
MohamedElashri / com.melashri.ssid-dns.plist
Last active October 6, 2025 00:42
Change DNS servers on Mac based on SSID
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"\>
<plist version="1.0">
<dict>
<key>Label</key><string>com.melashri.ssid-dns</string>
<key>ProgramArguments</key>
<array>
<string>/Users/melashri/.local/bin/ssid-dns</string>
</array>
@MohamedElashri
MohamedElashri / README.md
Created October 2, 2025 03:44
Cross-platform Electron Apps Detector

Electron Apps Detector

A single-file, cross-platform script that detects Electron Apps and their versions — without external dependencies.

Works on:

  • macOS (via mdfind + strings)
  • Linux (Debian, Ubuntu, Fedora, Arch, Flatpak, AppImage)
  • Windows (via PowerShell)

Usage

@MohamedElashri
MohamedElashri / syntax_highlight.py
Created September 25, 2025 16:02
Syntax Highlighting CSS Generator for Zola from Pygments Themes
#!/usr/bin/env python3
"""
Syntax Highlighting CSS Generator for Zola from Pygments Themes
Description:
Generate a combined light/dark mode syntax highlighting CSS file for Zola.
This script takes one light theme and one dark theme from Pygments and produces
a CSS file in the same format as the existing highlight.css file.
Author: Mohamed Elashri
@MohamedElashri
MohamedElashri / root_benchmark.sh
Created July 4, 2025 19:48
Benchamrk new linux machines by compiling ROOT
#!/usr/bin/env bash
# root_benchmark.sh – compile a minimal ROOT and collect build metrics
set -euo pipefail
############### Color helpers ###############
bold=$(tput bold) || true
red=$(tput setaf 1) || true
green=$(tput setaf 2) || true
yellow=$(tput setaf 3) || true
@MohamedElashri
MohamedElashri / amdgcn_electrons_fix.md
Created April 24, 2025 08:51
Fixing Electron App Crashes Caused by `amdgcn--` Triple Errors on Linux

⚠️ Fixing Electron App Crashes Caused by amdgcn-- Triple Errors on Linux

🧩 Problem

Electron-based applications (e.g., 1Password, VSCode, Discord, etc.) crash on Linux systems where AMD's ROCm or amdgpu-install driver stack is present. A representative error message looks like this:

Cannot find target for triple amdgcn-- Unable to find target for this triple (no targets are registered)
...
[ERROR:gpu_process_host.cc(981)] GPU process exited unexpectedly: exit_code=139
@MohamedElashri
MohamedElashri / condor_q_cheatsheet.md
Created April 22, 2025 06:07
condor_q cheatsheet

Condor _q Cheatsheet


1. View & Summarize Jobs

Command What it Does Example
condor_q Batched summary (one line per cluster) condor_q
condor_q -nobatch Per‑job listing (one line per proc) condor_q -nobatch 195
@MohamedElashri
MohamedElashri / cron_jobs_cheatsheet.md
Created March 21, 2025 13:09
Cron Jobs Cheat Sheet

Cron Jobs Cheat Sheet

1. Cron Time Format (Crontab Syntax)

Field Allowed Values Special Characters Meaning Example
Minute 0–59 * , - / Minute of the hour 0 = top of the hour
Hour 0–23 * , - / Hour of the day 5 = 5 AM
Day 1–31 * , - / Day of the month 15 = 15th