Skip to content

Instantly share code, notes, and snippets.

View hanigamal's full-sized avatar
🎯
Focusing at office

Hani Gamal hanigamal

🎯
Focusing at office
View GitHub Profile
@notflip
notflip / gulpfile.js
Created July 1, 2015 09:49
Laravel Gulpfile
var gulp = require('gulp');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var minify = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var plumber = require('gulp-plumber');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
@hassansin
hassansin / laravel-debugging.md
Last active July 2, 2017 22:00
Laravel Debugging #laravel #debugging
Get Query Logs
DB::enableQueryLog();
dd(DB::getQueryLog()); #output last executed queries
DB::table('users')->toSql() #show the generated sql statement 
DB::table('users')->getQuery()->wheres #show wheres conditions
Debug Messages with DebugBar
@jdavidbakr
jdavidbakr / AjaxFormBuilder.php
Last active October 27, 2016 00:00
Laravel: AjaxFormBuilder
<?php
namespace App\Services;
use Collective\Html\FormBuilder;
class AjaxFormBuilder extends FormBuilder {
protected $form_id;
protected $readonly = false;
@AmrMekkawy
AmrMekkawy / arabic-country-dropdown-list.html
Created May 17, 2015 10:24
Arabic countries HTML "select" element (dropdown list)
<!-- Country List in Arabic | source: https://github.com/umpirsky/country-list -- >
<select name="country">
<option value="AW">آروبا</option>
<option value="AZ">أذربيجان</option>
<option value="AM">أرمينيا</option>
<option value="ES">أسبانيا</option>
<option value="AU">أستراليا</option>
<option value="AF">أفغانستان</option>
<option value="AL">ألبانيا</option>
<option value="DE">ألمانيا</option>
<?php namespace App\Services;
use Exception;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract;
class Encrypter implements EncrypterContract {
/**
* The encryption key.
@maneja81
maneja81 / Passing-variables-between-iframe-and-parent-window.markdown
Created April 20, 2015 13:41
Passing variables between iframe and parent window

##Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management

###Instructions to Change PHP Installation

First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@barryvdh
barryvdh / .phpstorm.meta.php
Last active February 10, 2025 15:07
Laravel PhpStorm Meta file
<?php
namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@mul14
mul14 / README.md
Last active July 22, 2020 02:31
Laravel 5 Artisan Route List Filter Command

Copy RouteListFilterCommand.php to app/Console/Commands

Edit app/Console/Kernel.php, then add 'App\Console\Commands\RouteFilterCommand', to $commands, like so

protected $commands = [
	'App\Console\Commands\Inspire',
	'App\Console\Commands\RouteFilterCommand',
];
@kashifrazzaqui
kashifrazzaqui / code_review_checklist.txt
Last active February 17, 2024 23:05
Code Review Checklist
- General
[ ] The code works
[ ] The code is easy to understand
[ ] Follows coding conventions
[ ] Names are simple and if possible short
[ ] Names are spelt correctly
[ ] Names contain units where applicable
[ ] Enums are used instead of int constants where applicable
[ ] There are no usages of 'magic numbers'
[ ] All variables are in the smallest scope possible