Skip to content

Instantly share code, notes, and snippets.

View asikur's full-sized avatar

Asikur Islam asikur

View GitHub Profile
@asikur
asikur / default.conf
Created August 25, 2021 09:48 — forked from cbmd/default.conf
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@asikur
asikur / mysql_8_brew_sequel_pro.md
Created December 7, 2019 17:18
Installing MySQL 8 using homebrew and then connect it by Sequel Pro

Follow the steps bellow to fix problem connecting MySQL 8 using a database client i.e Sequel Pro

brew update
brew install mysql
brew services start mysql

Add default-authentication-plugin=mysql_native_password to my.cnf file. This config file can be found in the location /usr/local/etc/my.cnf

mysql -uroot

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '[password]';

@asikur
asikur / Instructions.sh
Created September 7, 2018 18:48 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
<?php
namespace App\Http\Middleware;
use Closure;
class JsonMiddleware
{
/**
* Handle an incoming request.