Skip to content

Instantly share code, notes, and snippets.

View marufmax's full-sized avatar
🎯
Focusing

Maruf Alom marufmax

🎯
Focusing
View GitHub Profile
@marufmax
marufmax / README.md
Created March 23, 2018 07:39 — forked from nammuey/README.md
My simply MySQL Command Line Cheatsheet
@marufmax
marufmax / deleteWithJS.php
Last active March 23, 2018 21:47
Laravel Delete Action with JS
<a class="btn btn-outline-secondary" onclick="
var result = confirm('Are you sure you wish to delete this project?');
if (result) {
event.preventDefault();
document.getElementById('delete-form').submit();
}"
>Delete</a>
<form id="delete-form" action="{{ route('companies.destroy', [$company->id]) }}" method="POST" style="display: none;">
<input type="hidden" name="_method" value="delete">
{{ csrf_field() }}
@marufmax
marufmax / error.blade.php
Created March 22, 2018 17:17
Laravel Bootstrap Session Success and Error Flash Messages
@if(isset($errors)&&count(errors) > 0)
<div class="alert alert-dismissible alert-danger fade show">
<button type="button" class="close" data-dismiss="alter" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@foreach($errors->all() as $error)
<li>
<strong>{!! $error !!}</strong>
</li>
@endforeach
@marufmax
marufmax / ifelse
Created February 28, 2018 06:46
Java Posetive and Negetive number checking using If else elseif
public class JavaBasic {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num;
System.out.println("Enter Any Number: ");
num = input.nextInt();
@marufmax
marufmax / install-laravel.sh
Created May 10, 2017 14:51 — forked from bigbeno37/install-laravel.sh
Install Laravel 5.4, MySQL 5.7, Apache2.4 and PHP7.1 on Ubuntu 16.04
# CREATED BY BEN O'SULLIVAN / BIGBENO37 (GITHUB.COM/BIGBENO37)
# LICENSED UNDER CREATIVE COMMONS 'Attribution 4.0 International' LICENSE
# https://creativecommons.org/licenses/by/4.0/
# FEEL FREE TO USE AND ADAPT THIS SCRIPT IN COMMERCIAL AND NON COMMERICAL PRODUCTS
# AS LONG AS PROPER ACCREDITATION IS GIVEN
# VARIABLES
echo -e "\x1B[01;95mWhat would you like to name your Laravel project?\x1B[0m"
read LARAVEL_PROJECT_NAME