Skip to content

Instantly share code, notes, and snippets.

Avatar

Abdulaziz Homaily homaily

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am homaily on github.
  • I am homaily (https://keybase.io/homaily) on keybase.
  • I have a public key ASCQpZIM9BD-p61rgG4jjXwJb1-lV24w3os2F4N9ih6VWAo

To claim this, I am signing this object:

@homaily
homaily / index.js
Last active Sep 5, 2019
Lambda download and cache gzipped file from s3
View index.js
'use strict';
console.log('// loading function');
const aws = require('aws-sdk');
const s3 = new aws.S3({apiVersion: '2006-03-01'});
const gzip = require('zlib').createGunzip();
const fs = require('fs');
@homaily
homaily / create.php
Created Feb 22, 2016
#Pay api client demo in PHP
View create.php
<?php
include_once 'functions.php';
$data = array(
"title" => "New Invoice",
"price" => 10,
"currency" => "SAR",
"description" => "Create new invoice.",
@homaily
homaily / index.html
Created Apr 8, 2015
Whatsapp share button
View index.html
<a alt="Whatsapp" href="whatsapp://send" data-text="Text to share" data-href="http://example.com/url-to-share" class="whatsapp wa_btn"><span class="ion-social-whatsapp"></span> Whatsapp</a>
@homaily
homaily / cities.json
Created Feb 17, 2015
Saudi Arabia Regions, Cities and Districts
View cities.json
[
{
"city_id" : 1,
"region_id" : 3,
"name" : {
"ar" : "تبوك",
"en" : "Tabuk"
}
},
{
View Open Cart Installer
#!/bin/bash
DIR=`pwd`
DB_HOSTNAME_DEFAULT=localhost
DB_USERNAME_DEFAULT=root
read -p "Enter HTTP_SERVER: " HTTP_SERVER
read -p "Enter DB_HOSTNAME ($DB_HOSTNAME_DEFAULT): " DB_HOSTNAME
@homaily
homaily / gist:8672499
Last active Sep 22, 2021
Regex to validate saudi mobile numbers
View gist:8672499

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

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 - شرح الكود