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 April 24, 2026 08:30
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 / MysqlConnection.java
Created January 19, 2018 01:36
Connent MySQL with Java using JDBC driver
//Mysql connection
//Author: Milon
//import java.sql.*;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
# SETUP #
DOMAIN=example.com
PROJECT_REPO="git@github.com:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
@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]