This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jms_security_extra: | |
| secure_all_services: false | |
| expressions: true | |
| security: | |
| encoders: | |
| Symfony\Component\Security\Core\User\User: | |
| algorithm: sha1 | |
| iterations: 1 | |
| encode_as_base64: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# Widgets #} | |
| {% block form_widget %} | |
| {% spaceless %} | |
| <fieldset {{ block('widget_container_attributes') }}> | |
| {{ block('field_rows') }} | |
| {{ form_rest(form) }} | |
| </fieldset> | |
| {% endspaceless %} | |
| {% endblock form_widget %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $builder | |
| ->add('firstName', 'text', array( | |
| 'label' => 'First Name', | |
| 'required' => false)) | |
| ->add('middleName', 'text', array( | |
| 'label' => 'Middle Name', | |
| 'required' => false)) | |
| ->add('lastName', 'text', array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh [email protected] | |
| [email protected]'s password: | |
| Welcome to Ubuntu 12.10 (GNU/Linux 3.5.0-17-generic i686) | |
| * Documentation: https://help.ubuntu.com/ | |
| Last login: Thu Mar 14 04:19:46 2013 from 75-169-63-34.slkc.qwest.net | |
| bash: groups: command not found | |
| I have no name!@host:~$ | |
| #################################################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $form = $this->createForm(new dateSelectType(), array('id'=>$id)); | |
| public function buildForm(FormBuilderInterface $builder, array $options) | |
| { | |
| $builder | |
| ->add('id', 'hidden') | |
| ->add('startDate', 'text', | |
| array( | |
| 'attr' => array('class' => 'date'), | |
| 'required' => false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT a.id as id, DATE(a.startTime) AS startTime, DATE(a.endTime) AS endTime, a.startTime AS startTime1, | |
| a.endTime AS endTime1, CONCAT(p.`first_name`, ' ', p.last_name) as `caseManager` FROM appointmentBlock a | |
| JOIN `User` p ON p.id = a.`caseManager_id` WHERE a.startTime BETWEEN :start AND :end | |
| GROUP BY a.startTime, a.caseManager_id | |
| Array | |
| ( | |
| [0] => Array | |
| ( | |
| [id] => 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function getAppointmentBlocksInRange($start, $end, $agent) { | |
| $em = $this->em; | |
| $rsm = new ResultSetMapping(); | |
| $rsm->addScalarResult('id', 'id'); | |
| $rsm->addScalarResult('startTime', 'startTime'); | |
| $rsm->addScalarResult('startTime1', 'startTime1'); | |
| $rsm->addScalarResult('endTime', 'endTime'); | |
| $rsm->addScalarResult('endTime1', 'endTime1'); | |
| $rsm->addScalarResult('caseManager', 'caseManager'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class XmlToJson { | |
| public function Parse ($url) { | |
| $fileContents= file_get_contents($url); | |
| $fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents); | |
| $fileContents = trim(str_replace('"', "'", $fileContents)); | |
| $simpleXml = simplexml_load_string($fileContents); | |
| $json = json_encode($simpleXml); | |
| return $json; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class generateToken { | |
| public function crypto_rand_secure($min, $max) { | |
| $range = $max - $min; | |
| if ($range < 0 ) { return $min; } | |
| $log = log($range, 2); | |
| $bytes = (int) ( $log / 8 ) + 1; | |
| $bits = (int) $log + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |