Skip to content

Instantly share code, notes, and snippets.


Brian Matovu mtvbrianking

Block or report user

Report or block mtvbrianking

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mtvbrianking /
Last active Sep 21, 2019
Sample API request tokens requests
curl -X POST \
  http://localhost:8000/api/v1/oauth/token \
  -H 'Accept: application/json' \
  -d 'grant_type=authorization_code' \
  -d 'client_id=b8e7163a-83a0-4386-b0bc-697a96edef14' \
  -d 'client_secret=bNQbpQnMPXayTn8XFPRQDWvIyyclN5pKnccVVUNx' \
  -d 'redirect_uri=http://localhost:8000/test/callback' \
  -d 'code=def502006626c316151b4f074308...'

Centos install or update PHP

yum --enablerepo=remi-php73 install php-mbstring php-gd php-intl php-xml php-mysql php-zip php-json php-soap php-pecl-zip

Centos php zip extension

yum --enablerepo=remi-php73 install php-pecl-zip

mtvbrianking / AllowCors.php
Last active Sep 13, 2019
Laravel Testing 'Before & After' Middleware
View AllowCors.php
namespace App\Http\Middleware;
use Closure;
class AllowCors
* Handle an incoming request.
mtvbrianking /
Last active Sep 11, 2019
mtvbrianking /
Last active Aug 31, 2019
Setting up Tailwind using Laravel Mix

[Boot NPM]

vim package.json

  "private": true,
  "dependencies": {},
  "devDependencies": {},
  "scripts": {
mtvbrianking / artisan-route-list.php
Created Apr 7, 2019
Laravel PHP Artisan route list
View artisan-route-list.php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Route;
class HomeController extends Controller
* Constructor.
mtvbrianking / google-maps-place-share-link.js
Last active Aug 9, 2019
Generate Google Maps place shareable link.
View google-maps-place-share-link.js
mtvbrianking /
Last active Jul 12, 2019
Setup supervisor process monitor, centos


Supervisor is a process monitor for the Linux operating system.


Check CentOS version

sudo rpm -q centos-release

mtvbrianking / array_dump_tree.php
Last active Jul 10, 2019
Print array elements as a tree
View array_dump_tree.php
$access = '{"permissions":{"accounts":{"users":["create"],"user_roles":["create","view"]},"assets":{"devices":["create","view","edit"]}}}';
$perms = json_decode($access, true)['permissions'];
// :: Recurvise print array
// :: Array Depth
function dump(&$array, $level = 0)
mtvbrianking /
Created Jul 8, 2019
Setup cron jobs on centos

Centos cron jobs

  1. Let's create a directory this purpose.

# cd

[root@server ~]# mkdir crontests

[root@server ~]# cd crontests

You can’t perform that action at this time.