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 / 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:

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
$ cd php-src
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') }}">
<li class="{{ URI::is( 'gallery') ? 'active' : '' }}">
m4grio / Blueprint.php
Last active Jun 14, 2019
Extending Laravel 5 Blueprint for MySqlConnection
View Blueprint.php
namespace App\Database\Schema;
use Illuminate\Database\Schema\Blueprint as ParentBlueprint;
use Illuminate\Support\Facades\DB;
* Class Blueprint
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;
jasonmccreary /
Last active Sep 19, 2019
Shell function to "fixup" and "autosquash" a commit with a single command.
# ref:
# usage: fixup [ref]
function fixup() {
git commit --fixup="$1"
GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash "$1"~1
# credit:
amochohan / 01_Laravel 5 Simple ACL
Last active Dec 18, 2019
Laravel 5 Simple ACL - Protect routes by an account / role type
View 01_Laravel 5 Simple ACL

#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.


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

carlo / gist:3402842
Created Aug 20, 2012
Bug report template
View gist:3402842
#### Issue description
#### Steps to reproduce the issue
gitaarik /
Last active Feb 21, 2020
Git Submodules basic explanation

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.
You can’t perform that action at this time.