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 / 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 / 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 / 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 / .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 / 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 / elasticsearch_on_homestead.md
Last active November 23, 2022 15:18
Install Elasticsearch on Laravel Homestead

Install Elasticsearch on Laravel Homestead

Install Java

sudo apt-get install openjdk-7-jre-headless -y

Download & install the Public Signing Key

wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
@milon
milon / bootstrap-tabs.js
Created December 1, 2016 07:25
This will add the tab's id appended to url as hash link, so that you can bookmark the tab.
var url = document.URL;
var hash = url.substring(url.indexOf('#'));
$(".nav-tabs").find("li a").each(function(key, val) {
if (hash == $(val).attr('href')) {
$(val).click();
}
$(val).click(function(ky, vl) {
location.hash = $(this).attr('href');
@milon
milon / stack.cpp
Last active April 24, 2018 21:47
stack.cpp
//Stack using array
//Author: Milon
#include<stdio.h>
//#include<conio.h>
#define max 50
void push();
void pop();
@milon
milon / Stack.java
Last active January 19, 2018 01:29
Data Structure: Stack
//Stack
//Author: Milon
import java.util.NoSuchElementException;
//Node class
class Node{
//Instance variable
protected Object data;
private Node nextNode;
@milon
milon / LinkedList.cpp
Created January 19, 2018 01:25
Data Structure: Linked List
//Linked list operations
//Author: Milon
#include<stdio.h>
#include<string.h>
#include<malloc.h>
//#include<conio.h>
void insert_first();
void insert_last();