Skip to content

Instantly share code, notes, and snippets.

View willianmano's full-sized avatar
🎯
Focusing

Willian Mano willianmano

🎯
Focusing
View GitHub Profile
<?php
$gruposCometas = [
'HALLEY' => 'AMARELO',
'ENCKE' => 'VERMELHO',
'WOLF' => 'PRETO',
'KUSHIDA' => 'AZUL'
];
$i = 1;
@willianmano
willianmano / gist:90466f304e5ecb37fc2b
Created September 27, 2014 00:31
pog_temp_acls_laravel
Route::filter('acl', function($route, $request)
{
$roles = array(
'visitante' => null,
'assessorado' => 'visitante',
'usuarioassessor' => 'visitante',
'assessor' => 'usuarioassessor'
);
$allow = array(
;roles
acl.roles.visitante = null
acl.roles.user = visitante
acl.roles.admin = user
;resources = controllers
acl.resources[] = index
acl.resources[] = auth
acl.resources[] = usuario
acl.resources[] = destinatario
global:
env:
- LARAVEL_ENV: production
web1:
name: securityapp
php_version: 5.3.23
php_display_errors: "32767"
php_extensions:
- mcrypt
- pdo_mysql
@willianmano
willianmano / gist:8016681
Created December 18, 2013 03:09
Trabalho OO - Uema
import java.util.Random;
class TrabalhoOO {
public static void main(String[] args)
{
Personagem personagem1 = new Personagem("Willian","Mago",150,10,5,100,50,1);
Personagem personagem2 = new Personagem("Monstro do RU","Cavaleiro",10,80,30,30,115,1);
System.out.println("Nome do personagem: " + personagem1.nome);
@willianmano
willianmano / gist:6607660
Created September 18, 2013 11:10
Twig problem
-----
WARNINGS E NOTICES
-----
[Wed Sep 18 08:06:30 2013] [error] [client 127.0.0.1] PHP Warning: Missing argument 1 for Respect\\Config\\Container::__invoke(), called in /var/www/html/respect/vendor/respect/config/library/Respect/Config/Container.php on line 387 and defined in /var/www/html/respect/vendor/respect/config/library/Respect/Config/Container.php on line 27
[Wed Sep 18 08:06:30 2013] [error] [client 127.0.0.1] PHP Notice: Undefined variable: spec in /var/www/html/respect/vendor/respect/config/library/Respect/Config/Container.php on line 29
[Wed Sep 18 08:06:30 2013] [error] [client 127.0.0.1] PHP Notice: Undefined variable: spec in /var/www/html/respect/vendor/respect/config/library/Respect/Config/Container.php on line 59
[Wed Sep 18 08:06:30 2013] [error] [client 127.0.0.1] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/respect/vendor/respect/config/library/Respect/Config/Container.php on line 59
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/servicos/public
ServerName servicos.dev
SetEnv APPLICATION_ENV development
<Directory /var/www/servicos/public>
Options Indexes FollowSymLinks
AllowOverride All
<VirtualHost *:80>
DocumentRoot "/var/www/soa-server/public"
ServerName soa.dev
SetEnv APPLICATION_ENV development
Header set Access-Control-Allow-Origin *
<Directory "/var/www/soa-server/public">
Options Indexes Multiviews FollowSymLinks
AllowOverride All
Order allow,deny