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
@carlo
carlo / gist:3402842
Created Aug 20, 2012
Bug report template
View gist:3402842
#### Issue description
#### Steps to reproduce the issue
1.
2.
3.
@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' : '' }}">
@gitaarik
gitaarik / git_submodules.md
Last active Feb 15, 2020
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.
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
@amochohan
amochohan / 01_Laravel 5 Simple ACL manager_Readme.md
Last active Dec 18, 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

@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
*
@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;
@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:
@jasonmccreary
jasonmccreary / fixup.sh
Last active Sep 19, 2019
Shell function to "fixup" and "autosquash" a commit with a single command.
View fixup.sh
# ref: https://twitter.com/gonedark/status/1174460639005356032
# usage: fixup [ref]
function fixup() {
git commit --fixup="$1"
GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash "$1"~1
}
# credit: https://stackoverflow.com/questions/29094595/git-interactive-rebase-without-opening-the-editor
You can’t perform that action at this time.