Skip to content

Instantly share code, notes, and snippets.

View WganMe's full-sized avatar

Wael Alnahari WganMe

View GitHub Profile
@olragon
olragon / run.sh
Last active January 3, 2017 00:37
HHVM config for Drupal 7 with clean urls working fine.
#!/usr/bin/env bash
sudo hhvm --config site1.hhvm.hdf --user www-data --mode daemon -v "Log.Level=Verbose" -v "Log.NoSilencer=on" -v "Log.Header=on"
@homaily
homaily / gist:8672499
Last active November 14, 2024 13:11
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 - شرح الكود

@ndavison
ndavison / nginx-drupal-hhvm.conf
Last active January 3, 2017 00:37
Nginx load balancing configuration for HHVM and Drupal
upstream myapp1 {
server 127.0.0.1:9000;
server 127.0.0.1:9001;
}
server {
listen 80;
server_name localhost;
root /var/www/html;
index index.php;
@WganMe
WganMe / configserver.sh
Created July 28, 2016 03:33
configserver
cd /usr/src
rm -fv csf.tgz
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
perl /usr/local/csf/bin/csftest.pl
sh /usr/local/csf/bin/remove_apf_bfd.sh
rm -Rfv /usr/src/csf*
cd /usr/src
@Manouchehri
Manouchehri / rfc3161.txt
Last active November 18, 2024 14:41
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
@ianthetechie
ianthetechie / Twilio Asterisk Secure Trunking HOWTO.md
Last active August 21, 2024 07:05
A short guide on how to set up an encrypted VoIP system using Twilio and Asterisk.

Twilio Asterisk Secure Trunking HOWTO

This is a short guide on how to set up an encrypted VoIP system using Twilio and Asterisk. I was a little annoyed that just about everything these days still uses unencrypted RTP for media (though just about everyone supports SIP over TLS). So I spent a weekend looking at options, and settled on a totally overkill solution involving Twilio's secure trunking to an Asterisk PBX. While all bets are off once it hits the PSTN, at least you won't be blasting your conversations over the internet in clear text.

@aldur
aldur / README.md
Created November 14, 2017 19:44
OnePlusRoot

Root OnePlus5 without unlocking the bootloader

Gain adb root.

$ adb shell am start -n com.android.engineeringmode/.qualcomm.DiagEnabled --es "code" "angela"

Download Magisk-v14.0 and extract it somewhere. Download MagiskManager.

@WganMe
WganMe / pre_virtualhost_global.conf
Last active April 10, 2018 19:45
pre_virtualhost_global.conf
Header unset X-Powered-By
AddDefaultCharset UTF-8
AddLanguage en-US .html .htm .css .js
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
#SetEnv SA Asia/Riyadh
Header set X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Security-Policy "allow 'self';"
Header set X-Content-Type-Options "nosniff"
ServerSignature Off
@shov
shov / AllowCrossOrigin.php
Last active February 8, 2024 18:29
Laravel middleware to Allow Cross Origin CORS
<?php
namespace App\Http\Middleware;
use Closure;
use Symfony\Component\HttpFoundation\Response;
/**
* The after middleware to allow specific Access-Control-Allow-Origin
*/
@WganMe
WganMe / Twilio Asterisk Secure Trunking HOWTO.md
Created August 8, 2020 05:17 — forked from ianthetechie/Twilio Asterisk Secure Trunking HOWTO.md
A short guide on how to set up an encrypted VoIP system using Twilio and Asterisk.

Twilio Asterisk Secure Trunking HOWTO

This is a short guide on how to set up an encrypted VoIP system using Twilio and Asterisk. I was a little annoyed that just about everything these days still uses unencrypted RTP for media (though just about everyone supports SIP over TLS). So I spent a weekend looking at options, and settled on a totally overkill solution involving Twilio's secure trunking to an Asterisk PBX. While all bets are off once it hits the PSTN, at least you won't be blasting your conversations over the internet in clear text.