Skip to content

Instantly share code, notes, and snippets.

View egulias's full-sized avatar

Eduardo Gulias Davis egulias

View GitHub Profile
@egulias
egulias / ann_guts
Created October 19, 2014 17:46
This is an abstract preview of a saved artificial neural network for SymfonyCon Madrid 2014
neurons (num_inputs, activation_function, activation_steepness)=(0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (0, 0, 0.00000000000000000000e+00) (10, 5, 5.00000000000000000000e-01) (10, 5, 5.00000000000000000000e-01) (10, 5, 5.00000000000000000000e-01) (0, 5, 0.00000000000000000000e+00) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (4, 5, 5.00000000000000000000e-01) (0, 5, 0.00000000000000000000e+00)
connections (connected_to_neuron, weight)=(0, 2.74120140075683593750e+00) (1, 1.17843687534332275391e+00) (2, 6.5268
@egulias
egulias / double filter
Created August 27, 2014 22:21
Tag debug sample output for --filter name=kernel.event_listener --filter attribute_value=event,kernel.controller
+-----------------------+-----------------------+------------------------------+
| Service | Tag | Attributes (name => value) |
+-----------------------+-----------------------+------------------------------+
| data_collector.router | kernel.event_listener | event => kernel.controller |
| | | method => onKernelController |
| | | |
| acme.demo.listener | kernel.event_listener | event => kernel.controller |
| | | method => onKernelController |
| | | |
+-----------------------+-----------------------+------------------------------+
@egulias
egulias / name=kernel.event_listener
Created August 27, 2014 22:19
Tag debug sample output for --filter name=kernel.event_listener
+--------------------------+-----------------------+------------------------------+
| Service | Tag | Attributes (name => value) |
+--------------------------+-----------------------+------------------------------+
| data_collector.router | kernel.event_listener | event => kernel.controller |
| | | method => onKernelController |
| | | |
| monolog.handler.console | kernel.event_listener | event => console.command |
| | | method => onCommand |
| | | priority => 255 |
| | | |
@egulias
egulias / filter_var test for email
Last active August 29, 2015 13:59
EmailValidator test using filter_var
//ValidEmails against filter_var
$ phpunit --filter testValidEmails
PHPUnit 4.1.1 by Sebastian Bergmann.
Configuration read from /home/eduardo/workspace/EmailValidator/phpunit.xml.dist
...F.FFF.F..F.....
Time: 50 ms, Memory: 4.25Mb
@egulias
egulias / deploy.rb
Last active August 29, 2015 13:56
Building GoLang with capifony
task :compile_go do
try_sudo "mkdir -p #{latest_release}/bin"
run "sh -c 'export GOPATH=#{latest_release} && cd #{latest_release}/bin && go get yorGoAppDir}'"
run "sh -c 'export GOPATH=#{latest_release} && cd #{latest_release}/bin && go build ../path/to/app.go'"
end
For Class/Object \Acme\DemoBundle\Entity\Comment::id == 1
With User admin
+------+-------+------+
| Mask | Grant | Deny |
+------+-------+------+
| 128 | X | |
+------+-------+------+
The ACL Voter will probably Allow access with those Masks
@egulias
egulias / sf security:debug:acl_voters username FQCN ID PERMISSION
Last active January 3, 2016 17:49
Symfony Security debug for ACL-Voterssecurity:debug:acl_voters command
[Who's voting?] Vote intention
+------------------------------------------------------------------------+---------+-------+------+
| Class | Abstain | Grant | Deny |
+------------------------------------------------------------------------+---------+-------+------+
| Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter | X | | |
| Symfony\Component\Security\Core\Authorization\Voter\ExpressionVoter | X | | |
| Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter | X | | |
| Symfony\Component\Security\Acl\Voter\AclVoter | | | X |
+------------------------------------------------------------------------+---------+-------+------+
Acces Denied for firewall secured_area and roles ROLE_SUPER
[Who's listening?] Firewall secured_area listeners
+-------------------------------------------------------------------------------------+------------------------------------------+
| Class | Stopped propagation |
+-------------------------------------------------------------------------------------+------------------------------------------+
| Symfony\Component\Security\Http\Firewall\ChannelListener | |
| Symfony\Component\Security\Http\Firewall\ContextListener | |
| Symfony\Component\Security\Http\Firewall\LogoutListener |
[Who's voting?] Vote intention
+------------------------------------------------------------------------+---------+-------+------+
| Class | Abstain | Grant | Deny |
+------------------------------------------------------------------------+---------+-------+------+
| Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter | | X | |
| Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter | X | | |
+------------------------------------------------------------------------+---------+-------+------+
[Strategy] decideAffirmative
[Result] Allow
@egulias
egulias / gist:6352371
Created August 27, 2013 11:26
Tests result of Swift_Validate::email($email) using the same providers as for egulias\EmailValidator
PHPUnit 3.7.24 by Sebastian Bergmann.
Configuration read from /home/eduardo/workspace/EmailValidator/tests/phpunit.xml.dist
.......F..........FF..................FF.FFFFFFF.FFFFFFFFFF
Time: 72 ms, Memory: 4.75Mb
There were 22 failures: