Skip to content

Instantly share code, notes, and snippets.

<?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;
@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
@IsmailShurrab
IsmailShurrab / gist:ddef2f8b2c49c871145fdea9a391e5ac
Created August 29, 2018 17:46
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 / 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 / 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 "[email protected]" >> /etc/ssmtp/ssmtp.conf
@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 / EmployeeRestaurant
Created January 6, 2018 14:58
EmployeeRestaurant
<?php
namespace App\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class EmployeeRestaurant extends Authenticatable
{
protected $casts = [
Here is the key code for each key stroke in JavaScript. You can use that and detect if the user has pressed the Shift key.
backspace 8
tab 9
enter 13
shift 16
ctrl 17
alt 18
pause/break 19
caps lock 20
@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 / installing-an-ssl-certificate-under-apache-xampp.md
Created December 17, 2017 15:41
Installing an SSL Certificate under Apache (XAMPP)