Skip to content

Instantly share code, notes, and snippets.

View milon's full-sized avatar
📧
Want a quick response? Tweet @to_milon.

Nuruzzaman Milon milon

📧
Want a quick response? Tweet @to_milon.
View GitHub Profile
@milon
milon / style
Created November 19, 2014 06:52
Bootstrap media query for responsive design
/**
* Bootstrap CSS
* CSS3 Media query for responsive design
*/
/* large grid only */
@media (min-width: 1200px) {
}
@milon
milon / server-laravel.md
Last active May 23, 2017 04:52
Set Up Server for Running Laravel PHP Framework 4.2.16

Set Up Server for Running Laravel PHP Framework 4.2.16


Operating System : Ubuntu 14.04.1

Web Server : Apache 2.4.7

Application Server : PHP 5.5.9

@milon
milon / mysql-backup_restore.md
Last active December 10, 2017 08:31
Mysql: Backup and Restore

#Mysql: Backup and Restore

Mysql Backup and restore through command line.

Backup

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

##Restore

@milon
milon / Controller.php
Last active November 27, 2023 18:32
Delete Modal Popup with Laravel, Bootstrap and jQuery
public function index(){
$categoryList = Category::all();
return view('category.list')->with('categoryList', $categoryList);
}
@milon
milon / numberToWord.php
Created February 26, 2015 08:13
Convert number to Word
function numberToWord($number) {
$hyphen = '-';
$conjunction = ' and ';
$separator = ', ';
$negative = 'negative ';
$decimal = ' point ';
$dictionary = array(
0 => 'zero',
1 => 'one',
2 => 'two',
@milon
milon / redis.md
Created May 10, 2015 03:51
Install Redis on Ubuntu

Install Redis on Ubuntu server

Install dependency to compile redis

sudo apt-get install build-essential
sudo apt-get install tcl8.5

Download and install

@milon
milon / Sublime Text Packages.md
Created June 16, 2015 11:57
Sublime Text Package that I used Day to Day Basis
@milon
milon / node-and-npm-in-30-seconds.sh
Last active August 29, 2015 14:25 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@milon
milon / laravel.js
Last active August 29, 2015 14:25 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
@milon
milon / Laravel-Image-Response.md
Last active October 19, 2015 08:36
Laravel Image Response.md

Laravel's document root is public folder. But you often needs to put your assets like images on other folders than public. Here is an example using intervestion/image package on laravel.

Route::get('images/{name}', function($name){
	if(! file_exists(storage_path("/app/$name"))){
		return App::abort(404);
	}

	// Get the image