Skip to content

Instantly share code, notes, and snippets.

View miyasinarafat's full-sized avatar
:octocat:
★★★

MD Iyasin Arafat miyasinarafat

:octocat:
★★★
View GitHub Profile
-----------------------------------------+------------------+
| Domain | Method | URI | Name | Action
| Middleware |
+--------+-----------+-----------------------------------------------------------+--------------------------------------------------+-----------------------------------
-----------------------------------------+------------------+
| | GET|HEAD | / | | Closure
| web |
| | GET|HEAD | admin | voyager.dashboard | \TCG\Voyager\Http\Controllers\VoyagerCon
troller@index | web,admin.user |
| | POST | admin/categories | voyager.categories.store
@miyasinarafat
miyasinarafat / vagrant destroy && vagrant up
Created January 18, 2018 02:45
vagrant destroy && vagrant up
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/psych.rb:379:in `parse': (<unknown>): did not find expected '-' indicator while parsing a block collection at line 78 column 5 (Psych::SyntaxError)
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/psych.rb:379:in `parse_stream'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/psych.rb:327:in `parse'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/psych.rb:254:in `load'
from C:/Users/Arafat/Homestead/Vagrantfile:28:in `block in <top (required)>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/loader.rb:125:in ` block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/loader.rb:119:in
@miyasinarafat
miyasinarafat / how_to_install_laravel_globally_in_ubuntu.md
Last active December 2, 2023 10:41 — forked from abhi9bakshi/laravel_setup_ubuntu_1610.md
How to install Laravel globally in Ubuntu

How to install Laravel globally in Ubuntu

===================================================================

Open your terminal using Ctrl+Alt+T and type the following commands

Step 1: Install Laravel

composer global require "laravel/installer"
@miyasinarafat
miyasinarafat / LICENSE
Created February 24, 2018 04:48 — forked from donnierayjones/LICENSE
Render Bootstrap as "small" layout when printing
Copyright (C) 2016 Donnie Ray Jones
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@miyasinarafat
miyasinarafat / Advanced Laravel Pagination
Created July 20, 2018 16:26
Advanced Laravel Pagination
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
let url = window.location.href;
$('.nav li a[href="'+url+'"]').addClass('active');
@miyasinarafat
miyasinarafat / Jquery validation problem with select 2 (Solved)
Last active October 25, 2018 11:33
Showing the error message on top of the select box. This codes solved the probelm and showing the message on buttom of the select box.
# CSS
<style>
.form-control.valid {
border-color: #28a745;
}
.form-control.error {
border-color: #dc3545;
}
.form-control.error:focus {
$('.datepicker-autoclose').datepicker({
autoclose: true,
todayHighlight: true
}).on('changeDate', function(ev) {
if($(this).valid()){
$(this).removeClass('invalid').addClass('success');
}
});

Background

While I'm learning how to use Nginx, I was instructed to update the server_names_hash_bucket_size (/etc/nginx/nginx.conf) value from 32 to 64, but I don't understand why should I increase the value to 64.

References

References that have been read so far:

@miyasinarafat
miyasinarafat / Model.php
Created December 3, 2018 07:45 — forked from vielhuber/Model.php
custom relationship in eloquent / eager loading #laravel
<?php
public function foos() {
$relation = $this->hasMany('App\Bar');
return $relation; // default behaviour
// modify the query builder
$relation->where('foo','bar');
return $relation;