Skip to content

Instantly share code, notes, and snippets.


Ndirangu Waweru nwaweru

Block or report user

Report or block nwaweru

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
fhdalikhan / AuthServiceProvider.php
Created Mar 26, 2019 — forked from ralphschindler/AuthServiceProvider.php
Laravel 5.8 Policy Guesser For Using "Models" Directory
View AuthServiceProvider.php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
jakebathman /
Created Aug 19, 2018
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
mtwalsh / deploy.php
Last active Mar 11, 2020
Deployer recipe for Laravel projects.
View deploy.php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', '');
// Project repository
set('repository', '');
View PhpStorm - Laravel Mix Alias Path Resolve Issue.js
// On PhpStorm, when ussing with laravel mix, for Alias path resolving in components you have to:
// - create a webpack.config.js file separately like:
const path = require('path')
const webpack = require('webpack')
module.exports = {
resolve: {
extensions: ['.js', '.json', '.vue'],
aurawindsurfing / cloudSettings
Last active Apr 12, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
bradtraversy /
Created Mar 23, 2018
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

View Visual Studio Code Settings For Laravel
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.formatOnPaste": true,
"editor.fontFamily" : "Fira Code",
"editor.fontLigatures": true,
"emmet.triggerExpansionOnTab": true,
"php.suggest.basic": false,
"editor.autoIndent": true,
"emmet.includeLanguages" : {
mlocati / exceptions-tree.php
Created Mar 9, 2017
Throwable and Exceptions tree
View exceptions-tree.php
if (!function_exists('interface_exists')) {
die('PHP version too old');
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
if (count($throwablesPerParent) !== 0) {
purwandi / Controller.php
Created Jun 2, 2016
Custom error format response Lumen Framework
View Controller.php
namespace App\Http\Controllers;
use Laravel\Lumen\Routing\Controller as BaseController;
class Controller extends BaseController
public function __construct()
You can’t perform that action at this time.