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 | |
// Adding some stupid comments | |
$system = dirname(dirname(__FILE__)); | |
ini_set('include_path', "$system/include"); | |
require_once 'Solar.php'; | |
Solar::start("$system/config/Solar.config.php"); | |
$campaigns = Solar::factory('Victoria_Model_Campaigns'); | |
$struct = $campaigns->fetch(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 some = function (callback) { | |
callback(); | |
foo(); | |
}; |
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 | |
/** | |
* | |
* Runs after _forward | |
* | |
* @return void | |
* | |
*/ | |
protected function _postRun() | |
{ |
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
(?xi) | |
\b | |
( # Capture 1: entire matched URL | |
(?: | |
[a-z][\w-]+: # URL protocol and colon | |
(?: | |
/{1,3} # 1-3 slashes | |
| # or | |
[a-z0-9%] # Single letter or digit or '%' | |
# (Trying not to match e.g. "URI::Escape") |
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
Protos AssertionException := Exception clone | |
Object do( | |
assert := method(v, m, | |
if(true != v, | |
m ifNil(m = "true != (#{ call argAt(0) })" interpolate) | |
AssertionException raise(m) | |
) | |
) |
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
# I'd like the inner object's methods to have access to Module's `inside` slot. | |
# The new lexicalDo won't cut it since the proto is long gone when the | |
# block/method gets called. | |
Module := Object clone do( | |
inside := 2 | |
Test := Object clone lexicalDo( | |
num := method(inside) | |
numblock := block(inside) setIsActivatable(true) |
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
(context | |
(lambda (test) | |
(test "hello"))) | |
;; I would like this to transform to the above | |
(group | |
(test "hello")) |
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
toHtml = (x) -> | |
if $.isArray x | |
if typeof x[0] is not \string then return map(toHtml, x).join('') | |
switch x.length | |
case 3 | |
"<#{x[0]} #{objToAttrs(x[1])}>#{toHtml(x[2])}</#{x[0]}>" | |
case 2 | |
"<#{x[0]}>#{toHtml(x[1])}</#{x[0]}>" | |
case 1 | |
"<#{x[0]}/>" |
OlderNewer