Skip to content

Instantly share code, notes, and snippets.

View egyjs's full-sized avatar
:shipit:
The One Behind the Green Checkmark

AbdulRahman El-zahaby egyjs

:shipit:
The One Behind the Green Checkmark
View GitHub Profile
@egyjs
egyjs / Speed Up Oh My Zsh + Powerlevel10k in Git Bash on Windows (66% Faster Startup).md
Created October 17, 2026 13:08
Speed Up Git Bash + Oh My Zsh on Windows (66% Faster Startup)

Fix slow zsh startup in Git Bash on Windows. Why Oh My Zsh and Powerlevel10k take over a second to load under MSYS2, how to measure it, and safe fixes that cut zsh startup from 719 ms to 243 ms without losing a single plugin.

Keywords: oh my zsh slow startup windows, git bash zsh slow, powerlevel10k git bash windows, msys2 zsh startup time, zsh-defer, compinit slow, zprof, zsh profiling

⚠️ Warning: AI can make mistakes. Everything here changes your shell startup files (~/.zshrc, ~/.bashrc, your Oh My Zsh install). One wrong line can leave you without a working terminal. Back up first, read every change before it is applied, and keep a second terminal (for example PowerShell) open so you can roll back. If you use the AI prompts at the end, supervise every step and approve each change yourself.


The issue

@egyjs
egyjs / Ollama-launch-claude-code-pass-arguments.md
Created May 13, 2026 23:53
Ollama launch Claude Code: pass `--resume`, `--dangerously-skip-permissions`, and other Claude CLI arguments

Ollama launch Claude Code: pass --resume, --dangerously-skip-permissions, and other Claude CLI arguments

TL;DR

Use -- to separate Ollama flags from Claude Code flags:

ollama launch claude --model minimax-m2.5:cloud -- --resume
@egyjs
egyjs / Anydesk Batch File.md
Created November 6, 2024 12:45
Fix AnyDesk Countdown Delay Issue - Anydesk Countdown Reset (100-second Issue) - إصلاح مشكلة العد التنازلي في AnyDesk

Fix AnyDesk Countdown Delay Issue - Anydesk Countdown Reset (100-second Issue) - إصلاح مشكلة العد التنازلي في AnyDesk

This batch script, anydesk-batch.bat, is designed to fix the AnyDesk 100-second countdown delay issue. It moves AnyDesk configuration files from their default locations to a backup folder named old. This solution targets files in both the AppData\Roaming\AnyDesk folder (user-specific) and ProgramData\AnyDesk folder (system-wide).

Purpose: Fixing the AnyDesk 100-Second Countdown

Occasionally, AnyDesk may mistakenly detect usage patterns that suggest you are using it for commercial purposes. As a result, it may trigger a 100-second delay popup, significantly slowing down your remote access experience. This script helps to reset AnyDesk's configuration files, moving them to an old folder, and potentially bypassing the delay and resetting AnyDesk's usage records that might be causing the popup.

Why You Need This Script

@egyjs
egyjs / Automating Postman to Swagger with Version Control in Laravel Vapor.md
Last active January 18, 2024 16:17
Automating Postman to Swagger with Version Control using GitHub Actions and Laravel

Title: Automating Postman to Swagger with Version Control in Laravel Vapor


Hey folks! 👋 I wanted to share a neat workflow I've implemented for our Laravel Vapor project that automates the generation and upload of Swagger documentation with each Git tag, all seamlessly integrated with Postman. 🚀

🤖 GitHub Actions Workflow (deploy.yml)

With every push to a dev/* tag, GitHub Actions springs into action:

@egyjs
egyjs / auto replace SRC,HREF with Laravel functions.md
Last active July 5, 2024 14:37
[laravel asset function] how to auto replace SRC,HREF with Laravel function using regex

This is the best I have so far using regex:

Find:

<((?!\s*((a)\s+))\w+)(.*?)((?:src|href)\s*=\s*")((?!\{\{\s*)[^"]+)"

Replace with:

&lt;$1$4$5{{ asset('$6') }}"
@fworks
fworks / install-zsh-windows-git-bash.md
Last active October 17, 2026 13:10
Zsh / Oh-my-zsh on Windows Git Bash
@egyjs
egyjs / .htaccess
Last active June 5, 2020 05:48
Laravel 5-6 – Remove Public from URL
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]
@egyjs
egyjs / php-html-css-js-minifier.php
Created July 10, 2019 11:53 — forked from Rodrigo54/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@egyjs
egyjs / Lorem IpsumJS.md
Last active July 26, 2019 12:41
Lorem Ipsum - All the facts - Lipsum generator by javascript
@egyjs
egyjs / getImgFromString.php
Created June 11, 2018 03:42
PHP | get all <img> tag and extract the “src” attribute
<?php
function getImgFromString($html){
preg_match_all('/<img[^>]+>/i',$html, $result);
$img = array();
$i = 0;
foreach( $result[0] as $img_tag)
{
preg_match_all('/(src)="([^"]+)"/i',$img_tag, $img[$i]);
$i++;