Skip to content

Instantly share code, notes, and snippets.

View jahid32's full-sized avatar

Md Mostafizur Rahman jahid32

  • Sourcetop Inc.
  • Bangladesh
View GitHub Profile
@jahid32
jahid32 / LICENCE SUBLIME TEXT
Created December 20, 2016 13:39
Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
@jahid32
jahid32 / App\Http\Kernel.php
Created December 6, 2016 20:37
Laravel 5 - Multiple Auth Database Tables - Native Way
<?php namespace App\Http;
/**
* 01 - Set the auth config as usual in app/config/auth.php file.
* This example uses Eloquent driver...
*
* 02 - Create a Middleware for each auth context ex: Admin, Customers.
*
* 03 - Register the Middlewares in app/Http/Kernel.php routeMiddleware array...
*
আফটার ডিস্কানেট ইউর নেট, এনজয়! :D
1. licensed email: c2942269@drdrb.com
registration code: 00289623F7B3B81E14AEB526144B6D08
2. licensed email: c2943267@drdrb.com
registration code: D772BE0279AFE60AF0E1D2109CA89A19
(10 likes)
3. licensed email: iskar@mail.com
registration code: F3417231967A385CC355EA57DBCA0932
@jahid32
jahid32 / docker.text
Created November 6, 2016 17:07
Docker Command list
docker ps -aqf "name=containername"
where containername is your container name
explanation:
-q for quiet. output only the ID
-a for all. works even if your container is not running
-f for filter.
Export:
drush sql-dump --gzip > db_backup/db-name_$(date +%Y-%m-%d-%H.%M.%S).sql.gz
drush cc all && drush sql-dump > db_backup/db-name-$(date +%Y-%m-%d-%H.%M.%S).sql
Import:
gunzip -c db_backup/db_name.sql.gz | pv | drush sqlc
drush sqlc < db_backup/db_name.sql
mysql -u username -p database_name < db.sql
@jahid32
jahid32 / htaccess.txt
Last active July 29, 2016 05:39
See server image in local development
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/sites/default/files/(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://sites.com/$1 [L,QSA]
@jahid32
jahid32 / drush-turn-off-aggregate-assets.txt
Last active August 31, 2016 12:57 — forked from chrisjlee/drush-turn-off-aggregate-assets.txt
drush disable js/css aggregation
// To turn on JS Aggregation
drush vset preprocess_js 1 --yes
// To clear all Cache
drush cc all
// To disable JS Aggregation
drush vset preprocess_js 0 --yes
// To clear cache of JS and CSS only
@jahid32
jahid32 / label-to-placeholder.js
Created June 29, 2016 06:08 — forked from makeusabrew/label-to-placeholder.js
Simple jQuery snippet to convert form labels into inline placeholders
$("form :input").each(function(index, elem) {
var eId = $(elem).attr("id");
var label = null;
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) {
$(elem).attr("placeholder", $(label).html());
$(label).remove();
}
});
@jahid32
jahid32 / dabblet.css
Created May 31, 2016 10:04 — forked from csssecrets/dabblet.css
Translucent borders
/**
* Translucent borders
*/
body {
background: url('http://csssecrets.io/images/stone-art.jpg');
}
div {
border: 10px solid hsla(0,0%,100%,.5);