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 | |
| $closure = function ($params) use (&$closure) { | |
| // ... | |
| $closure($params); | |
| } | |
| // Start the magics | |
| $closure($params); |
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 save() | |
| { | |
| // | |
| // Find the root ID of the category to make selecting much easier | |
| // | |
| // Get all categories | |
| $all_categories = $this->all_categories(); | |
| $parent_id = $this->get_parent_id(); | |
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
| # custom prompt | |
| # pman, open man in preview | |
| pman() { man -t "$@" | open -f -a Preview; } | |
| # aliases | |
| alias planzaivps="ssh -p 1892 batman@planzai.com" | |
| # open files in coda | |
| alias coda="open -a Coda" |
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
| <script type="text/javascript"> | |
| /* | |
| * Basic reusable form validation | |
| * | |
| * @author Pete Hawkins <pete@craftydevil.co.uk> | |
| * @created 2011-05-11 | |
| * @requires jQuery | |
| * | |
| * Setup: | |
| * Add your fields as objects in an array to the validatorConfig.fields object. |
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 | |
| $start = microtime(); | |
| $x = 1; | |
| do{ | |
| $x++; | |
| $result = null; | |
| $i = 0; |
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 | |
| $start = microtime(); | |
| $x = 1; | |
| do{ | |
| $x++; | |
| $result = null; | |
| $i = 0; |
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 add_facebook( $id, $fb_access_token ) | |
| { | |
| $data = array('fb_access_token' => $fb_access_token); | |
| $this->db->where('id', $id); | |
| if( $this->db->update( $this->db_table, $data ) ) | |
| { | |
| return TRUE; | |
| } | |
| else | |
| { |
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
| // you need js if you want to reference: | |
| header{ | |
| color: 'pink'; | |
| } | |
| // but without the need for js you can have: | |
| <header id="header"> | |
| and do | |
| #header{ | |
| color: 'pink'; |
NewerOlder