Skip to content

Instantly share code, notes, and snippets.

View emtudo's full-sized avatar

Leandro Henrique Reis emtudo

View GitHub Profile
<?php namespace App\Exceptions;
use Exception;
use Illuminate\Http\Response;
use App\Exceptions\Handler as BaseExceptionHandler;
class WhoopsHandler extends BaseExceptionHandler {
/**
* Render an exception into a response.
@emtudo
emtudo / Post.php
Last active August 29, 2015 14:26 — forked from vluzrmos/Post.php
Example how to remove the eager loading on Eloquent.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
/**
* Array of relationships to load.
@emtudo
emtudo / principais_packages.md
Last active June 13, 2016 11:53 — forked from vluzrmos/principais_packages.md
Lista dos principais packages para Laravel citados no 16º Hangout Laravel Brasil.
@emtudo
emtudo / nav-bar.php
Last active August 29, 2015 14:25 — forked from henriquesousa/nav-bar.php
Adicionando classe 'active' com jQuery em cada página visitada.
<script>
$(document).ready(function(){
var aurl = window.location.pathname;
$('.main-nav li a[href$="'+aurl+'"]').parents('li').addClass('active');
});
</script>
<nav class="main-nav">
<ul class="list-unstyled">
<li class="">
#!/bin/bash
# Based on https://github.com/maxolasersquad/Git-Notifier/blob/master/gitnotify.sh
declare -A GN_LASTSHOW
GN_DURATION=120
for GN_BRANCH in `git branch -a | grep remotes/origin/master | sed 's/ -> .*//' | sed 's/^ //'`; do
GN_BRANCH_ARRAY=`echo ${GN_BRANCH} | sed 's/\//_/g'`