Skip to content

Instantly share code, notes, and snippets.

View MuhammadSulaiman001's full-sized avatar
🏠
Working from home

Muhammad Sulaiman MuhammadSulaiman001

🏠
Working from home
View GitHub Profile
In my setup, Codex used Windows PowerShell 5.1 and could not find Node.js because fnm was configured only in PowerShell 7 (`pwsh`). These shells use separate profiles, so add `fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression` to `$PROFILE` in both shells, then restart their sessions. See the [official fnm instructions](https://github.com/Schniz/fnm#powershell).
@MuhammadSulaiman001
MuhammadSulaiman001 / .gitconfig
Last active April 24, 2026 05:33
Uploaded .gitconfig via Copilot CLI, see my aliases, diff tool and delta configs
[user]
name = Muhammad Sulaiman
email = muhammad.b.sulaiman001@gmail.com
[diff]
tool = pycharm
[difftool]
prompt = false
[difftool "pycharm"]
cmd = \"C:/Program Files/JetBrains/PyCharm 2025.3.2.1/bin/pycharm64.exe\" diff $LOCAL $REMOTE
keepBackup = false

How to learn new technology?

Repeat these in small cycles:

  1. read official docs
  2. cli & --help (important)
  3. check github samples
  4. writing/running tests

Until: DONE.

#include <iostream>
#include <spdlog/spdlog.h>
#include <glm/vec3.hpp>
int main()
{
std::cout << "Hello World!\n";
spdlog::info("Welcome to spdlog!");
auto vector3 = glm::vec3(.5, 1, 1);
std::cout << "vector3.x = " << vector3.x;
  • Run pwsh code block in .bat file, for example:
pwsh -Command "& {(get-item .).basename}"

RESTful API best practices guide - by Shai Yerushalmi

Web API’s is a web development architecture which decoupling the client GUI from the database and the server’s logic. This architecture enables to serve the same interface to multiple clients running on various platforms. Also, the same application can communicate with multiple interfaces.

REST stands for Representational state transfer and its a stateless protocol over HTTP that provides the interactions with the resources stored in the database which contains four basic CRUD actions - Create, Read, Update and Delete.

Each CRUD interaction can be defined by combinations of the following:

git .mailmap file

Steps

  1. Use this good git alias
git config --global alias.summary '! git shortlog --summary --numbered --email --all --no-merges'
@MuhammadSulaiman001
MuhammadSulaiman001 / git-quick-stats on windows.md
Last active February 25, 2024 05:33 — forked from arzzen/cygwin-installer.sh
How to get "git-quick-stats" working on windows (using PowerShell)
  1. Setup,
# Clone the repo
git clone https://github.com/arzzen/git-quick-stats
# Move inside
cd git-quick-stats
# There is a file called "git-quick-stats", we'll add its path to .gitconfig file..

Useful newtonsoft utilities (3 files)

.vcxproj setup (best practices)

  1. Project Properties -> General:

    • Top dropdowns = "All configurations" and "All platforms",
    • C++ Language Standard = C++ 20
    • Output and Temp Directories (default location is at .sln level)
      • Set Output Directory to $(ProjectDir)$(Platform)\$(Configuration)
      • Set Temp Directory to $(ProjectDir)$(Platform)\Temp-$(Configuration)
  2. Headers: