Skip to content

Instantly share code, notes, and snippets.

🌏
Somewhere between home and Hogwarts School of Witchcraft and Wizardry

Tim Joosten Tjoosten

🌏
Somewhere between home and Hogwarts School of Witchcraft and Wizardry
  • Polar Youth
  • Antwerp, BE
Block or report user

Report or block Tjoosten

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
@georgeasd
georgeasd / gist:228f5e1c115405d01532ec7ad96f38dd
Created Sep 27, 2016 — forked from nghuuphuoc/gist:7874407
Backup and restore MySQL database
View gist:228f5e1c115405d01532ec7ad96f38dd
// Backup
$ mysqldump -u [username] -p [databasename] > [filename.sql]
Enter password:
// Restore
$ mysql -u [username] -p [databasename] < [filename.sql]
Enter password:
@jacurtis
jacurtis / App\Exceptions\Handler.php
Created Jul 28, 2016
How to get filp/whoops to work in Laravel 5.2 or 5.3 - Add this code to your `App\Exceptions\Handler.php` file.
View App\Exceptions\Handler.php
/**
* Create a Symfony response for the given exception.
*
* @param \Exception $e
* @return mixed
*/
protected function convertExceptionToResponse(Exception $e)
{
if (config('app.debug')) {
$whoops = new \Whoops\Run;
@m4grio
m4grio / Blueprint.php
Last active Jun 14, 2019
Extending Laravel 5 Blueprint for MySqlConnection
View Blueprint.php
<?php
namespace App\Database\Schema;
use Illuminate\Database\Schema\Blueprint as ParentBlueprint;
use Illuminate\Support\Facades\DB;
/**
* Class Blueprint
*
@amochohan
amochohan / 01_Laravel 5 Simple ACL manager_Readme.md
Last active Aug 10, 2019
Laravel 5 Simple ACL - Protect routes by an account / role type
View 01_Laravel 5 Simple ACL manager_Readme.md

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

View readme-php7.md

Quick install PHP 7.0:

1. Install depends PHP 7.0
$ brew install autoconf automake gmp homebrew/versions/bison27 gd freetype t1lib gettext zlib mcrypt
2. Configure PHP 7.0
$ git clone --depth=1 https://github.com/php/php-src.git
$ cd php-src
@gitaarik
gitaarik / git_submodules.md
Last active Aug 20, 2019
Git Submodules basic explanation
View git_submodules.md

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@DanielMarklund
DanielMarklund / gist:3415529
Created Aug 21, 2012
Laravel - Navigation Active Class
View gist:3415529
<!-- Example on how to set class="active" on active navigation links -->
<!-- These links will always be visible -->
<li class="{{ URI::is( 'home') ? 'active' : '' }}">
<a href="{{ URL::to( 'home') }}">
Home
</a>
</li>
<li class="{{ URI::is( 'gallery') ? 'active' : '' }}">
You can’t perform that action at this time.