Skip to content

Instantly share code, notes, and snippets.

View WatheqAlshowaiter's full-sized avatar

Watheq Alshowaiter WatheqAlshowaiter

View GitHub Profile
@WatheqAlshowaiter
WatheqAlshowaiter / .htaccess
Created April 1, 2020 21:23
this is my nginx.conf / valet.conf/ .htaccess / files:
<IfModule mod_rewrite.c>
RewriteEngine On
#Prevent Indexing
Options +FollowSymLinks -Indexes
#Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
const cheerio = require("cheerio");
const { readFileSync, writeFileSync } = require("fs");
const fs = require("fs");
var TurndownService = require("turndown");
const path = require("path");
const years = [
"2009",
"2010",
"2011",
@WatheqAlshowaiter
WatheqAlshowaiter / gist:020fa14aa8e3ef6ffb4cfac8307c4397
Created April 28, 2022 10:50 — forked from homaily/gist:8672499
Regex to validate saudi mobile numbers

السلام عليكم ، هذا كود ريجيكس بسيط للتحقق من صحة أرقام الجوالات السعودية ، يقوم الريجيكس بالتحقق من مفتاح الدولة ، مفتاح شركة الإتصالات لضمان صحة النص المدخل .

Hello, this is a simple regex to validate saudi mobile numbers, the code will validate country code, telecome company code and make sure the tested sting is correct .

/^(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/

Regex Breakdown - شرح الكود

@WatheqAlshowaiter
WatheqAlshowaiter / fix-dompdf-ar.php
Last active January 30, 2023 18:17
Fix dompdf/dompdf library to render Arabic text (works version 2.0.1)
<?php
// First, download the ar-php library via: composer require khaled.alshamaa/ar-php
// Second, in the file (dompdf/dompdf/src/Renderer/Text.php)
// add the code between `// CHANGE ONLY THIS BELOW` and `// CHANGE ONLY THIS ABOVE` in line 81 in the
/**
* @package dompdf
* @link https://github.com/dompdf/dompdf
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License

Clauad+

Question

an SQL PC builder schema like pcpartpicker.com to ensure compatibility for each component. If the component is selected, other incompatible components don't appear (or we can toggle that).

the components are mother board, CPU, etc

convert above requirements to SQL

@WatheqAlshowaiter
WatheqAlshowaiter / BragDoc.md
Last active June 1, 2023 09:29 — forked from muath-ye/BragDoc.md
@WatheqAlshowaiter template for brag document

Brag document / weekly professional journal

Note: I advice you to write every thursday (at the end of the workday week)

week 23 (4 June, 2023)

Courses