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 / 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 / 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 / .antigenrc
Created March 15, 2022 18:57
.antigenrc file for zsh configuration
# load oh-my-zsh
antigen use oh-my-zsh
# use oh-my-zsh plugin
antigen bundle git
# use custom plugin
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
@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 / build-publish.yml
Last active May 30, 2022 09:10
Github Action with Jigsaw
name: Build & Publish
on:
push:
branches:
- develop
schedule:
- cron: "0 2 * * 1-5"
jobs:
@milon
milon / weather.md
Last active March 18, 2022 11:30
A little alias for showing weather in command line

Prerequisite

It assumes you have curl installed in your system.

Install

Add this function in your .bashrc or .zshrc file.

weather() {curl wttr.in/${1:-Berlin}}
@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 / .php_cs.laravel.php
Created July 30, 2020 09:50 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null]
@milon
milon / GenerateIndex.php
Created April 21, 2020 21:23
Search functionality with Fuse.js in Jigsaw powered website.
<?php
namespace App\Listeners;
use TightenCo\Jigsaw\Jigsaw;
class GenerateIndex
{
public function handle(Jigsaw $jigsaw)
{
@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"