Skip to content

Instantly share code, notes, and snippets.

View muath-ye's full-sized avatar
🚀
npx muath

Muath Alsowadi muath-ye

🚀
npx muath
View GitHub Profile
@muath-ye
muath-ye / index.php
Created December 4, 2024 18:11
Track visitors of your website by including this script on your index.php
<?php
// This is a laravel example
include 'track-image.php';
use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
/*

Setting Database User Privileges for WordPress in cPanel

When setting up a WordPress site on cPanel, one of the key steps is creating a MySQL database and assigning the necessary privileges to the user that will interact with that database. Properly configuring the database user permissions ensures that WordPress has the correct access to perform essential tasks such as reading, writing, and modifying content in the database.

In this article, we will walk you through the necessary database user privileges required by WordPress to function properly, and explain how to set them up in cPanel.


What Are Database User Privileges?

<?php
namespace App\Http\Controllers;
use App\Models\User;
use Hash;
use Illuminate\Http\Request;
use Laravel\Sanctum\PersonalAccessToken;
class SanctumAuthenticationController extends Controller

Copy the files to your directory

Note: In my case the direcotry is C:\Program Portables\pgsql

Add the bin dir to environment

generate *.bat files useing the helper GENERATE_BASHES.ps1

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
@-moz-document domain("web.whatsapp.com") {
/* Insert code here... */
._aigv._aigw {
filter: blur(5px);
}
span._ahxt.x1ypdohk.xt0b8zv._ao3e, /* chat sender name */
span._ahxt._ao3e, /* chat replay */
span.x1iyjqo2.x6ikm8r.x10wlt62.x1n2onr6.xlyipyv.xuxw1ft.x1rg5ohu._ao3e, /* chat heading - group name */
span.x1iyjqo2.x6ikm8r.x10wlt62.xlyipyv.xuxw1ft._ao3e.selectable-text.copyable-text, /* chat heading - group members */
._ak8l /* chat list on sidebar */

Table to help evaluate centralized and decentralized API management in Odoo:

Criteria Centralized API Module Decentralized (API in Each Module)
Code Organization All API code is in one module, providing a single access point for all endpoints. Each module contains its own API, making it modular and self-contained.
Dependency Management Requires the centralized API module to have dependencies on all other modules, leading to potential complexity as new modules are added. Dependencies are isolated within each module, reducing inter-module dependencies.
Scalability Can become difficult to scale as the centralized module grows with the addition of new APIs. Highly scalable, as each module can evolve independently with its o
@muath-ye
muath-ye / getProductQuantityInWarehouse.php
Created October 29, 2024 17:13
الحصول على كمية المنتجات في مخزن معين خلال فترة زمنية محددة
<?php
use Illuminate\Http\Request;
use App\Models\InventoryTransaction;
use Carbon\Carbon;
public function getProductQuantityInWarehouse(Request $request)
{
$request->validate([
'product_id' => 'required|exists:products,id',

A User Story is a fundamental element of Agile project management, used to describe a feature or functionality from the perspective of the end user. It's a simple, concise way to capture what a user needs or wants, focusing on the value it brings rather than the technical details of implementation. User stories are designed to keep the development team aligned with customer needs, emphasizing delivering real value in each feature or task.

Key Components of a User Story

A user story typically follows a format like:

As a [role], I want to [goal] so that [benefit].

Here’s a breakdown of each part:

Here are a few types of Agile plan templates that you can create in Excel to manage Agile projects efficiently. These templates follow typical Agile methodologies like Scrum or Kanban, and they can be easily customized according to your project needs.

1. Agile Sprint Planning Template

This template helps plan and track a single sprint (usually 1–4 weeks). It allows you to manage tasks, assign resources, and monitor progress.

Columns:

  • Task ID: Unique identifier for each task.
  • User Story: Description of the user story or feature.
  • Task: Breakdown of tasks from the user story.

Here’s a Sprint Plan template presented as a table:

Sprint ID Sprint Name Start Date End Date Sprint Goal Planned User Stories Completed User Stories Team Members Capacity (in story points) Velocity (in story points) Status Comments

Field Explanations:

  1. Sprint ID: Unique identifier for the sprint.
  2. Sprint Name: A descriptive name for the sprint.