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 / LEMP SERVER on Ubuntu 14.04.md
Created May 25, 2016 05:59
Installing LEMP Server on Ubuntu 14.04

LEMP Server on Ubuntu 14.04

For detail look here

Install nginx

sudo apt-get install nginx

then get IP address and try it on browser

@milon
milon / .gvimrc
Last active August 8, 2017 10:10
My .vimrc file
set guifont=Fira_Code:h15 " font for mac vim
set linespace=14 " line spacing for macvim
set macligatures " Fira code symbols enables
set guioptions-=e " Disable GUI tabs
" remove any scrollbar
set guioptions-=L
set guioptions-=l
set guioptions-=R
set guioptions-=r
@milon
milon / route-02.php
Created February 16, 2016 02:05
Laravel Route Example
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
protected $webNamespace = 'App\Http\Controllers\Web';
@milon
milon / route-01.php
Created February 16, 2016 01:34
Laravel Route Example
<?php
Route::get('/', function() {
return 'Hello World';
});
Route::get('/login', 'AuthController@loginForm');
Route::post('/login', 'AuthController@postLogin');
Route::delete('/logout', 'AuthController@logout');
@milon
milon / Mac show-hide files.md
Last active March 2, 2020 15:04
Show hidden files on Mac OS X

Mac Show/Hide Files

Add these two lines to your .bashrc or .zshrc file.

alias show-files="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app"

alias hide-files="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app"
@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
@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 / 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 / Sublime Text Packages.md
Created June 16, 2015 11:57
Sublime Text Package that I used Day to Day Basis
@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