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

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:

@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..

Definition (Code Smells) Code smells are common code anti-patterns which could and should be refactored.

This doc is summarized from Martin Flower's book Refactoring (the 2nd Edition).

Refactoring is all about Change

  • You may inverse previous refactorings as software grows
  • You may change names of a function/parameter/varible/... as you learn

How to use this doc

Go to a section of code smell, and the refactoring techniques to that smell are written in Pascal Case under the Solution section. Refer to the book's catalog to get detailed examples and explainations for each refactoring technique.

Table of Code Smells

@MuhammadSulaiman001
MuhammadSulaiman001 / xampp-setup.md
Created August 27, 2022 06:48 — forked from peterhurford/gist:8602d9fb334baa71d983
How to use XAMPP to test PHP on your own computer

So this is a guide for how to use XAMPP to test any PHP website on your own computer. Well, actually, it's more a guide of guides than an actual guide. I personally didn't find the process to be bad, but it also wasn't straightforward, and it involved a lot of googling separate problems. There was no One Guide for the Entire Process, but a bunch of separate things.

So I decided to put everything together. Here are the steps:

Step 1: Install XAMPP. Download from here.

Step 2: Set up XAMPP. Follow instructions here.

Step 3: Go to PhpMyAdmin and create any relevant MySQL tables, if any.

@MuhammadSulaiman001
MuhammadSulaiman001 / .gitignore
Last active August 22, 2022 08:56 — forked from kmorcinek/.gitignore
Example .gitignore file I use for C# projects
# The following command works for downloading when using Git for Windows:
# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files
@MuhammadSulaiman001
MuhammadSulaiman001 / clean_code.md
Created August 20, 2022 09:50 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@MuhammadSulaiman001
MuhammadSulaiman001 / Git Branching Strategy.md
Created August 1, 2022 17:52 — forked from jpolete/Git Branching Strategy.md
Git/GitHub branching standards & conventions

Git Branching Strategy

Quick Legend

Branch Name Notes
Stable master Accepts merges from Release and Hotfix branches only.
Development develop Accepts merges from Feature/Bugfix, Release and Hotfix
Features/Bugfix feat-* / bug-* Always branch off HEAD of develop
Hotfix hotfix-* Always branch off master. Merges back into master and develop.
@MuhammadSulaiman001
MuhammadSulaiman001 / CHANGELOG.md
Created April 20, 2022 18:28 — forked from juampynr/CHANGELOG.md
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as