Skip to content

Instantly share code, notes, and snippets.

View MuhammadQuran17's full-sized avatar

Muhammad Umar MuhammadQuran17

  • DanAds
View GitHub Profile
@MuhammadQuran17
MuhammadQuran17 / patterns.md
Last active October 9, 2025 05:47
OOP-Patterns

Observer and Pub/Sub pattern

While the terms are often used interchangeably, there is a technical distinction:

Publisher-subscriber is a network oriented architectural pattern and Observer is an object-event oriented pattern. They both are used at different Software levels.

Observer pattern: The subject (event) directly manages and notifies its observers (listeners). It's typically implemented within a single application process or codebase.

@MuhammadQuran17
MuhammadQuran17 / ai_infrastructure.md
Last active October 6, 2025 11:48
AWS, Azure For AI infrastructure.

Pricing is the same as in AI providers API's\

Privacy

  1. OpenAI - Privacy . OpenAI temporarily stores your data for two main reasons, but it does not use your API data to train its models unless you explicitly agree to it.
    For Safety (Abuse Monitoring): OpenAI keeps a log of your requests (prompts and responses) for up to 30 days. This is like a temporary security camera recording. They use it to check if anyone is using the platform for harmful purposes, like creating illegal or dangerous content. This is the default setting for everyone.
    To Make Features Work (Application State): Some tools, like the Assistants API, need to remember your conversation history or the files you've uploaded to function correctly. If you create an Assistant, it will store that data until you decide to delete it. For most simple requests, like generating text with the Chat Completions endpoint, no data is stored for this purpose.
    **Zero D
@MuhammadQuran17
MuhammadQuran17 / sso.md
Created October 5, 2025 12:11
SSO helper
@MuhammadQuran17
MuhammadQuran17 / the_vibe_of_vibe_coding.md
Last active October 4, 2025 04:34
The vibe of vibe coding

Usefull Md's

  1. Codebase analyst

IMPORTANT: You MUST follow these principles in all code changes and PRP generations:

KISS (Keep It Simple, Stupid)

Simplicity should be a key goal in design
Choose straightforward solutions over complex ones whenever possible\

@MuhammadQuran17
MuhammadQuran17 / windows_cheat.md
Last active October 3, 2025 10:17
windows helper

Win key doesn't work

  1. Press FN + Win it should work now.

VOICE ACCESS

  1. Mute and unmute to turn on and turn off the Voice Access
  2. click find a something For example if you have in your page Cancel button, you can say click find a cancel . Also you can use it for anything on your page with this command.
  3. Show numbers - to show which element have what number in your current page. Then you can say click 5 for example.
  4. Go to text field for moving your cursor into textable field.
  5. Type to type
@MuhammadQuran17
MuhammadQuran17 / vibe_coding_principles.md
Created September 27, 2025 07:45
In a Vibe of vibe coding

Vibe coding Manifest by Muhammad Umar

  1. Do not rely on AI generated code of a new framework/language that you don't know. If you haven't written even a 1 line of code, in that language/framework, you should at least read documentation, understand how it works, and then orchestrate the Ai. Reading documentation should be a pleasure.
@MuhammadQuran17
MuhammadQuran17 / GDPR_Cookie_consent.md
Last active September 24, 2025 06:48
GDPR Cookie consent
@MuhammadQuran17
MuhammadQuran17 / cashier_stripe_laravel.md
Last active January 9, 2026 05:48
cashier_stripe_laravel.md

Stripe

Cashier v15.7

  1. you should not seed/fill any migrations. Cashier migrations will be populated automatically after getting response from stripe.
  2. You need to duplicate Stripe's product name, price , description to show it on a pricing table in UI. Duplicate it in config file or in some db table
  3. $user->subscribed() checks wheter user is subscribed to any product.
  4. $user->subscribedToProduct('STRIPE_PRODUCT_ID') the parameter will be the stripe's product id.
  5. You should not use SAP when redirecting $request->user()>newSubscription()->checkout(), not use axios, or Inerti, just use window.location.href = route('subscribe', { plan: planId });
  6. pm_type, pm_last_four in users table will be filled only if user will select save his payment_card. when a user has a default payment method set on their Stripe customer.
@MuhammadQuran17
MuhammadQuran17 / openai_models_list.json
Created July 3, 2025 10:46
openai_models_from_their_api
{
"object": "list",
"data": [
{
"id": "gpt-4-0613",
"object": "model",
"created": 1686588896,
"owned_by": "openai"
},
{
  • localStorage is similar to sessionStorage , except that while localStorage data has no expiration time, sessionStorage data gets cleared when the page session ends — that is, when the page is closed.
  • LocalStorage can store up to 5 MB (Megabytes) of data per domain in most modern browsers. This limit applies to both localStorage and sessionStorage. While this is a considerable amount of space compared to cookies (4KB)