This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am graemetait on github. | |
* I am graeme_ea (https://keybase.io/graeme_ea) on keybase. | |
* I have a public key ASBt8mP4oyyKUyQ2PBy9JBW27td-RjrPYdCIGeeK325VAgo | |
To claim this, I am signing this object: |
This file contains 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 Entity | |
{ | |
public function __get($property) | |
{ | |
if (property_exists($this, $property)) { | |
return $this->{$property}; | |
} | |
} | |
} |
This file contains 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
javascript:$('.bs-docs-sidebar').css({'float': 'none', 'width': 'auto'}); $('.bs-docs-sidenav').css({'position': 'relative', 'top': 'auto', 'width': 'auto'}); $('.container > .row > .span9').addClass('span12').removeClass('span9'); |
This file contains 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
def check_isbn13(isbn) | |
total = 0 | |
12.times do |i| | |
# puts i % 2 | |
if i % 2 == 0 | |
total += isbn[i].to_i | |
else | |
total += isbn[i].to_i * 3 | |
end | |
end |
This file contains 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 MyToroHandler extends ToroHandler { | |
public $tpl; | |
public function __construct() { | |
$this->tpl = new Template(TPL_PATH); | |
ToroHook::add('after_handler', function() { $this->tpl->display('layout.tpl.php'); }); | |
} | |
} |