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 / update_curl.sh
Created December 8, 2017 18:06 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@jahid32
jahid32 / xampp_php7_xdebug.md
Created January 13, 2017 14:45 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@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...
*
@jahid32
jahid32 / drush-turn-off-aggregate-assets.txt
Last active August 31, 2016 12:57 — forked from chrisl8888/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);
@jahid32
jahid32 / DB.sql
Created October 13, 2015 09:56 — forked from msurguy/DB.sql
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public