Skip to content

Instantly share code, notes, and snippets.

Eduardo Gulias Davis egulias

Block or report user

Report or block egulias

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@egulias
egulias / ann_guts
Created Oct 19, 2014
This is an abstract preview of a saved artificial neural network for SymfonyCon Madrid 2014
View ann_guts
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 Aug 27, 2014
Tag debug sample output for --filter name=kernel.event_listener --filter attribute_value=event,kernel.controller
View double filter
+-----------------------+-----------------------+------------------------------+
| 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 Aug 27, 2014
Tag debug sample output for --filter name=kernel.event_listener
View 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 Aug 29, 2015
EmailValidator test using filter_var
View filter_var test for email
//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 Aug 29, 2015
Building GoLang with capifony
View deploy.rb
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
View sf security:debug:acl_object username FQCN id mask_binary
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 Jan 3, 2016
Symfony Security debug for ACL-Voterssecurity:debug:acl_voters command
View sf security:debug:acl_voters username FQCN ID PERMISSION
[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 |
+------------------------------------------------------------------------+---------+-------+------+
View sf security:debug:firewalls [exact route] secured_area user ROLE_SUPER
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 |
View sf security:debug:voters secured_area user userpass
[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 Aug 27, 2013
Tests result of Swift_Validate::email($email) using the same providers as for egulias\EmailValidator
View gist:6352371
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:
You can’t perform that action at this time.