Skip to content

Instantly share code, notes, and snippets.

View leabdalla's full-sized avatar
Working from home

Leandro Abdalla leabdalla

Working from home
View GitHub Profile
leabdalla / Laravel Sentry 2 with multiple user
Last active February 10, 2024 10:57
Laravel Sentry 2 with multiple user types, finally.

Sentry is an amazing auth system. But I really need a feature: multiple user types in the same app. And I cannot separate those in groups, because they have different table columns. After 2 days burning my head, I think I found a good solution. The magic is duplicate SentryServiceProvider with new different settings.

This was tested on Laravel 4.0 and Sentry 2. If you're using other version of Sentry, my suggestion is to follow same steps from this gist but use your local files instead copying files from here.

Lets suppose we have a fresh Sentry install with default User ambient. Now we want another ambient called Admin, with new model and different settings. How to do:

1. One model, one ambient

leabdalla /
Created August 1, 2013 21:43
How to use Laravel in Windows IIS

Laravel 4 in Windows Server IIS

###1. Put this web.config in laravel root diretory

<?xml version="1.0" encoding="UTF-8"?>
leabdalla / filtro_gmail
Last active May 11, 2020 15:36
Este filtro é alimentado desde 2006 e contém todos os endereços que um dia já me enviaram mensagens com ofertas de compras sem a minha permissão. Hoje ele pega cerca de 10 mensagens todos os dias, despoluindo minha caixa postal e me poupando tempo. OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR OR emailcenter@
library(shiny) # library que faz a interface interativa //
library(readxl) # library que faz a leitura de excel //
library(dplyr) # library que ajuda na manipulacao dos dados //
library(magrittr) # library que permite encadear comandos (usados nos filtros) //
library(ggplot2) # library que faz a criacao de diversos graficos //
" faz leitura do arquivo excel
ENTRADAS <- read_xlsx("parkaz_ociosidade_de_loja.xlsx", col_names=TRUE)