Skip to content

Instantly share code, notes, and snippets.

View a-magdy's full-sized avatar

Ahmed Magdy a-magdy

  • Copenhagen, Denmark
View GitHub Profile
@a-magdy
a-magdy / install-mohaa.md
Created November 21, 2025 09:40
Mohaa Install Quick Guide

The Complete Guide to Medal of Honor: Allied Assault in 2025

Relive the classic World War II shooter with modern compatibility and multiplayer support!

Thanks to the OpenMohaa project, you can now experience this classic with modern compatibility, enhanced performance, and active multiplayer servers.

This comprehensive guide will walk you through everything you need to:

  • ✅ Install and run MOHAA on modern systems (Windows, Mac, Linux)
  • ✅ Set up multiplayer gaming with friends
🧠 All-in-One Kickoff Prompt for the Hackathon:
Act as an expert in prompt engineering and GitHub Copilot for C# in Visual Studio. Give me a curated list of advanced prompting techniques (like Q&A, Role prompting, Prompt Chaining, Few-shot, RAG simulation, etc.) that I can use to get the most out of Copilot as a senior developer. For each technique, include a brief description and an example prompt relevant to .NET or C# development. Keep the tone light and witty, but make the insights actionable and impressive.
@a-magdy
a-magdy / env.sh
Last active November 13, 2023 14:01
export vars from .env file
#!/bin/bash
# Use grep to validate each line using regex (clears out comments, empty lines and validates that each line is in the format of env vars)
# Then send it out to sed, to append export at the beginning of each line and ; at the end
# Then eval all
eval "$(grep -E '^[A-Za-z_][A-Za-z0-9_]*=.*' '.env' | sed 's/.*/export &;/')"
#====================================================================================
# Archive
#====================================================================================
@a-magdy
a-magdy / dotnet.sh
Last active August 30, 2023 21:13
Get node latest version for a major release
#!/bin/bash
MAJOR_VERSION=${1:-7}
# $1 => major release version (e.g. 6, 7)
dotnet_get_latest_version() {
if [[ -n "$1" ]] ; then
# Get latest by major version using jq
curl -s https://api.github.com/repos/dotnet/core/releases | jq -r '.[].tag_name | select(. | startswith("v'"${1:-7}"'."))' | head -n 1 | sed 's/v//g'
else
@a-magdy
a-magdy / change-author.sh
Last active August 23, 2023 12:31
Change commits author
#!/bin/bash
function unique_list_of_committers() {
git log --format="%aN <%aE>" | sort -u
}
function change_author() {
FROM_EMAIL=$1
FROM_NAME=$2
TO_EMAIL=$3
@a-magdy
a-magdy / gh.yaml
Last active July 27, 2023 17:45
GH Actions Log Secrets
jobs:
build:
steps:
- name: Log Secrets & Vars
shell: bash
run: |
echo "echo \"ARM_CLIENT_ID ($ARM_CLIENT_ID): \$(decode '$(echo ${ARM_CLIENT_ID} | base64)')\""
echo "echo \"ARM_CLIENT_SECRET ($ARM_CLIENT_SECRET): \$(decode '$(echo ${ARM_CLIENT_SECRET} | base64)')\""
echo "echo \"ARM_SUBSCRIPTION_ID ($ARM_SUBSCRIPTION_ID): \$(decode '$(echo ${ARM_SUBSCRIPTION_ID} | base64)')\""
echo "echo \"ARM_TENANT_ID ($ARM_TENANT_ID): \$(decode '$(echo ${ARM_TENANT_ID} | base64)')\""

Keybase proof

I hereby claim:

  • I am a-magdy on github.
  • I am ahmedmagdy (https://keybase.io/ahmedmagdy) on keybase.
  • I have a public key ASD8rVIHZD-wHK6OJMXP_Uunm6kuinSzaGFjGdPfRxkAJAo

To claim this, I am signing this object: