Skip to content

Instantly share code, notes, and snippets.

🤙
Available

Ndirangu Waweru nwaweru

🤙
Available
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
fhdalikhan / AuthServiceProvider.php
Created Mar 26, 2019 — forked from ralphschindler/AuthServiceProvider.php
Laravel 5.8 Policy Guesser For Using "Models" Directory
View AuthServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
/**
@jakebathman
jakebathman / logslaravel.sh
Created Aug 19, 2018
Tail Laravel logs and filter out the stack traces
View logslaravel.sh
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]+?\:" \
--color
@mtwalsh
mtwalsh / deploy.php
Last active Mar 11, 2020
Deployer recipe for Laravel projects.
View deploy.php
<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'enovate.co.uk');
// Project repository
set('repository', 'git@githosting.com:enovatedesign/project.git');
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
aurawindsurfing / cloudSettings
Last active Feb 20, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-07-27T19:36:28.740Z","extensionVersion":"v3.4.1"}
@bradtraversy
bradtraversy / sample.md
Created Mar 23, 2018
Markdown Cheat Sheet
View sample.md

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
mlocati / exceptions-tree.php
Created Mar 9, 2017
Throwable and Exceptions tree
View exceptions-tree.php
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@purwandi
purwandi / Controller.php
Created Jun 2, 2016
Custom error format response Lumen Framework
View Controller.php
<?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.