I hereby claim:
- I am fullybaked on github.
- I am fullybaked (https://keybase.io/fullybaked) on keybase.
- I have a public key whose fingerprint is 9919 C36F D1FD E4E5 CB0A E92F 8B05 EE06 F9EF 3B39
To claim this, I am signing this object:
| /* bling.js */ | |
| window.$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function (name, fn) { | |
| this.addEventListener(name, fn); | |
| } | |
| NodeList.prototype.__proto__ = Array.prototype; |
| <?php | |
| // PHP 5.6 | |
| usort($array, function($a, $b) { | |
| if ($a == $b) { | |
| return 0; | |
| } | |
| return ($a < $b) ? -1 : 1; | |
| }); |
| // open athens dates come from a date picker text input in the view, in the format dd-mm-yyyy | |
| <?= $this->Form->input('openathens_start_date, [ | |
| 'type' => 'text', | |
| 'class' => 'datepicker']);?> | |
| <?= $this->Form->input('openathens_end_date, [ | |
| 'type' => 'text', | |
| 'class' => 'datepicker']);?> | |
| // in the Table | |
| public function beforeMarshal(Event $event, \ArrayObject $data, \ArrayObject $options) |
| <?php | |
| // data controller | |
| public function get_data() | |
| { | |
| $data = [ | |
| 'item' => $this->getDataFromSomewhere(), | |
| 'min' => 0, | |
| 'max' => 10 | |
| ]; |
| <?php | |
| public function findByFullName($search_term) { | |
| $users->find() | |
| ->where(['CONCAT(UserProfiles.first_name, " ", UserProfiles.lastname)' => $search_term]); | |
| ->contain(self::$applicant_contain) | |
| ->order(['Users.primary_role' => 'DESC', 'Users.modified' => 'DESC']) | |
| ->limit(25); | |
| } |
| select count(DISTINCT project_id), sum(amount), user_id | |
| from payments | |
| group by user_id | |
| order by sum(amount) desc; |
| <?php | |
| /** | |
| * This is a _very_ rough draft of an idea to create a composable field in a model | |
| * by which, the Model::find methods would return a value object rather plain data | |
| * for a given field. | |
| * | |
| * Value Objects would be created in the /Lib directory of the application | |
| * | |
| * This is a work in progress hence being a Gist. | |
| */ |
| <?php | |
| namespace Fullybaked; | |
| use FileNotFound; | |
| /** | |
| * File class | |
| * | |
| * Simple wrapper for native methods file_get_contents and file_put_contents | |
| * in an OOP context and with some useful methods for getting information about | |
| * a given File |
| <?php | |
| class Person extends AppModel | |
| { | |
| // must explicitly set the useTable so child classes | |
| // use this not the CakePHP conventions based on their | |
| // class name | |
| public $useTable = 'people'; | |
| // table people exists in the database with schema | |
| // id int(11) PK | |
| // type varchar(20) default 'contact' not null |
I hereby claim:
To claim this, I am signing this object: