Skip to content

Instantly share code, notes, and snippets.

@IsmailShurrab
IsmailShurrab / 1_customFunctions.php
Created August 13, 2017 19:58 — forked from MrShennawy/1_customFunctions.php
now you can query by regexp in laravel !! بالعربى إزاى تعمل بحث بالألف همزه ومن غير وهكذا ة ه وال ي وي ..... إلخ
<?php
//الملف ده اللى بيكون موجود فيه الدوال المساعده للشغل وغالبا بيكون مساره كالتالى
// app/helper/help.php
// ملحوظه (الملف ده انت اللى بتعمله عشان تحط جوا الفنكشنز اللى هتساعدك فى شغلك )0
#================ search at sql text to regx =====================================
function sql_text_to_regx($string){
$alamat = array("+","=","-","_",")","(","*","&","^","%","$","#","@","!","/","\\","|",">","<","?","؟");
$alamat_change = "";
$alef = array("ا","أ","آ","إ");
$alef_change = "@@@";
@IsmailShurrab
IsmailShurrab / compat_l5.php
Created December 16, 2017 09:20 — forked from vluzrmos/compat_l5.php
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)
@IsmailShurrab
IsmailShurrab / installing-an-ssl-certificate-under-apache-xampp.md
Created December 17, 2017 15:41
Installing an SSL Certificate under Apache (XAMPP)
@IsmailShurrab
IsmailShurrab / SSLXampp.md
Created December 17, 2017 15:43 — forked from nguyenanhtu/SSLXampp.md
Guide to configure SSL in XAMPP for Windows

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
@IsmailShurrab
IsmailShurrab / Schedulable.php
Created March 10, 2018 09:22 — forked from davidpiesse/Schedulable.php
Laravel Custom Class/Model Scheduling
<?php
//Don't forget to change the namespace!
namespace App\Traits;
use Cron\CronExpression;
use Illuminate\Support\Carbon;
use Illuminate\Console\Scheduling\ManagesFrequencies;
trait Schedulable{
@IsmailShurrab
IsmailShurrab / Dockerfile
Created April 15, 2018 22:37 — forked from michaelneu/Dockerfile
docker-compose configuration for PHP with NGINX and MySQL, including sendmail, MailDev and phpmyadmin
# see https://github.com/cmaessen/docker-php-sendmail for more information
FROM php:fpm
RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mysql mysqli
RUN echo "hostname=localhost.localdomain" > /etc/ssmtp/ssmtp.conf
RUN echo "root=root@example.com" >> /etc/ssmtp/ssmtp.conf
@IsmailShurrab
IsmailShurrab / WebSocketController.php
Created August 8, 2018 08:11 — forked from Mevrael/WebSocketController.php
Laravel + WebSocket (Ratchet/ReactPHP) integration
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Session;
use Ratchet\WebSocket\Version\RFC6455\Connection;
@IsmailShurrab
IsmailShurrab / gist:ddef2f8b2c49c871145fdea9a391e5ac
Created August 29, 2018 17:46 — forked from lossendae/gist:974151
Image Preloader with jQuery and wordpress
/*<![CDATA[*/
$(document).ready( function(){
var images = $(document).find('.to_load img');
$.each( images, function( idx, value){
var original = $(this);
$(this).addClass('hidden');
$('<span class="img_loader">&nbsp;</span>').insertBefore( original );
var src = $(this).attr('src');
var $img = new Image();
$($img).delay( 500 ).load( function(){
@IsmailShurrab
IsmailShurrab / notification-bar-set-cookie.html
Created September 3, 2018 11:48 — forked from chancesmith/notification-bar-set-cookie.html
Bootstrap alert top notification bar + cookie set after closed
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Mail;