Skip to content

Instantly share code, notes, and snippets.

Sajad Dehshiri sajaddp

View GitHub Profile
@sajaddp
sajaddp / Mega menu dropdown with bootstrap 4.html
Last active Jun 19, 2018
Mega menu dropdown with bootstrap 4
View Mega menu dropdown with bootstrap 4.html
<nav class="navbar navbar-expand-sm">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item dropdown has-mega-menu mx-auto">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Derpdown</a>
<div class="dropdown-menu">
@sajaddp
sajaddp / Clear git cache
Last active May 1, 2018
Clear git cache
View Clear git cache
git rm -r --cached .
git add .
@sajaddp
sajaddp / unique.js
Created Mar 14, 2018
Removing Array Duplicates in ES6
View unique.js
let array = [1,2,3,3,5,4,8,9,5,2,3,1,2,2,1,1,3,6,4,8,9,1,2,5,3,4,6,9,7,8,9];
let unique_array = [...new Set(array)]; // [1, 2, 3, 5, 4, 8, 9, 6, 7]
@sajaddp
sajaddp / PHP-Get-Geocode-from-Address
Created Jul 22, 2017 — forked from madeinnordeste/PHP-Get-Geocode-from-Address
PHP - Get Geocode (lat, long) from Address
View PHP-Get-Geocode-from-Address
<?php
$address = 'avenida+gustavo+paiva,maceio,alagoas,brasil';
$geocode = file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$address.'&sensor=false');
$output= json_decode($geocode);
$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;
View Redis Config Laravel
Use Redis for Broadcasting:
config/broadcasting.php
Use Redis for Cache:
config/cache.php
Use Redis for Queue:
config/queue.php
Use Redis for Session:
View composer redis laravel
composer require predis/predis
@sajaddp
sajaddp / Add Redis to PHP.INI
Created Sep 4, 2016
معرفی اکستنشن redis به PHP
View Add Redis to PHP.INI
extension=php_redis.dll
You can’t perform that action at this time.