Skip to content

Instantly share code, notes, and snippets.

View emtudo's full-sized avatar

Leandro Henrique Reis emtudo

View GitHub Profile
@ribeiroevandro
ribeiroevandro / git-notifier
Created June 28, 2013 00:28
Facilitar o trabalho em equipe, usando o GIT como versionador de código.
#!/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'`
@vluzrmos
vluzrmos / principais_packages.md
Last active June 17, 2020 21:48
Lista dos principais packages para Laravel citados no 16º Hangout Laravel Brasil.
@vinicius73
vinicius73 / CustomValidatorsServiceProvider.php
Last active May 5, 2016 20:54
Helper para datas Laravel
<?php
namespace App\Support\Validators;
use Illuminate\Support\ServiceProvider;
use Illuminate\Validation\Factory as ValidatorFactory;
class CustomValidatorsServiceProvider extends ServiceProvider
{
public function boot()
<?php
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Foundation/helpers.php#L56
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Container/Container.php#L1128
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Container/Container.php#L614
$query = app(User::class)->newQuery();
$query = app()->make(User::class)->newQuery();
$query = app()->make('\App\Domains\Users\User')->newQuery();
$modelClass = User::class;
$query = app($modelClass)->newQuery();
@vinicius73
vinicius73 / Presenter.php
Created May 5, 2016 19:01
abstract class Presenter
<?php
namespace App\Support\ViewPresenter;
use Carbon\Carbon;
use Illuminate\Support\Str;
abstract class Presenter
{
/**
@gnumoksha
gnumoksha / auto_sync_git.sh
Created June 20, 2016 19:39
Does the git pull of all subdirectories
#!/bin/bash
# This script syncs (i.e. makes git pull) on a specified directory or, se no
# parameter was specified, in all the subdirectories that are git projects.
#
# Usage:
# ./auto_sync_git.sh directory_of_my_project
# ./auto_sync_git.sh
# An alias to the git binary