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
function findClosestLine($line) { | |
$Line->find('first', array( | |
'conditions' => array('line <='=>5.1), | |
'order' => 'line desc' | |
)); | |
} |
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
class Transaction < ActiveRecord::Base | |
belongs_to :transactable, :polymorphic => true | |
end |
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 | |
/** Dynamic method injection to php **/ | |
class Dog { | |
static $_methods; | |
function __call($method, $args) { | |
if (isset(self::$_methods[$method])) { | |
$method = self::$_methods[$method] | |
} |
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
mods-enabled/alias.load | |
mods-enabled/authz_owner.load | |
mods-enabled/env.load | |
mods-enabled/negotiation.load | |
mods-enabled/auth_basic.load | |
mods-enabled/autoindex.load | |
mods-enabled/headers.load | |
mods-enabled/authz_default.load | |
mods-enabled/deflate.load | |
mods-enabled/mime.load |
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
[Google](http://google.com "google search engine") | |
// outputs <a href="http://google.com" title="google search engine">Google</a> | |
[Google](http://google.com ":button") | |
// outputs <a href="http://google.com" class="button">Google</a> | |
[Google](http://google.com "google search engine :button") | |
// outputs <a href="http://google.com" class="button" title="google search engine">Google</a> | |
[Google](http://google.com "google search engine :button :external") |
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
- **The Largest European Poker Network** | |
- **Guaranteed US$15 Million won Every Month** | |
- **Trips to the Greatest Land Based Events** | |
- **Free $*600 to Get the Action Started** | |
### Join Today for our 100% MATCH DEPOSIT up to $600 ### | |
*Minimum deposit required and wagering restrictions apply. For more information read our [Terms and Conditions.][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
- <var class="parent parent dl casino"/> | |
- ![Centrebet casino][1] | |
- param1 | |
![Centrebet Games][2] | |
param 2 | |
param 3 |
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 | |
/** | |
* To implment tagging behavior to be able to plug into any data model in the system | |
* | |
* Requirements | |
* You are required to create "tags" table to hold all tag entries | |
* You are required to create a "[tableName]_tags" table for each object you | |
* want to tag. for example, to implement tags for pages u need this table | |
* pages_tags (page_id : int, tag_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
H2o hacking guide | |
argument parsing. | |
===================== | |
* variable name turns to ":variable" which uses ruby symbol style string to indicate if its a variable and to speed up context lookup | |
* arguments are seperated by comma | |
* anything looks like named argument(name: "peter", age: 18) will parse into a option style array | |
H2o_Parser::parseArguments("variable") |
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
<h1>{{ person.name }}</h1> | |
{% block content %} | |
<small>block:{{ block.name }}, level: {{ block.depth }} ?></small> | |
(i am {{ block.age }} years old) | |
{% endblock %} | |
<ul> | |
{% for hobby in person.hobbies %} | |
<li>{{ hobby|capitalize }}</li> | |
{% endfor %} | |
</ul> |