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
# jQuery. | |
$ = jQuery | |
# The slot where the next guessed letter will fall. | |
guessSlot = 0 | |
# The prefix necessary to keep the letter lists centered. | |
prefix = 2 | |
# Triggered when a guess is submitted. |
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
app.register( | |
'.html' | |
compile: (source, options) -> | |
if typeof source isnt 'string' then source else | |
(options) -> | |
mustache.to_html( | |
source |
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 | |
function base_url() { | |
return (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/'; | |
} | |
function path_parts() { | |
return array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))); | |
} |
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
Man: | |
Hey! HEY! Will you help me?! | |
Decide: Will you help him? | |
No: | |
Man: | |
:(... |
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
// array = [ | |
// "#{value.candidates[0]}:#{value.index}" | |
// value.argTypes.map (argType) -> {V: [newCustomValue argType]} | |
// ] | |
array->Set(0, String::New((value.candidates[0] + ":" + value.index).toAscii())); | |
Handle<Array> args = Array::New(); | |
for (int i = 0; i < value.argTypes.length(); i++) { | |
Handle<Array> a = Array::New(); |
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 | |
function transform_name($name) { | |
// Always remove .php. | |
$name = str_replace('.php', '', $name); | |
// Replace any non alphanumeric characters with '-'. | |
$name = preg_replace("[^a-zA-Z0-9", "-", $name); | |
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
// argument = if (customValue = newCustomValue type)? | |
// V: [customvalue] | |
// else | |
// I: [vicarValues(entity, type).shift().index] | |
Handle<Object> argument = Object::New(); | |
Handle<v8::Value> customValue = newCustomValue(type); | |
if (!customValue->IsUndefined()) { | |
Handle<Array> a = Array::New(); |
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
// if (customValue = newCustomValue type)? | |
// V: [customvalue] | |
// else | |
// values = vicarValues entity, type | |
// I: [values[Object.keys(values)[0]].index] | |
Handle<Object> argument = Object::New(); | |
Handle<v8::Value> customValue = newCustomValue(type); | |
if (!customValue->IsUndefined()) { |
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
// argument = if (customValue = newCustomValue type)? | |
// V: [customvalue] | |
// else | |
// values = vicarValues entity, type | |
// I: [values[Object.keys(values).shift()].index] |
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
// argument = if (customValue = newCustomValue type)? | |
// V: [customvalue] | |
// else | |
// values = vicarValues entity, type | |
// I: [values[Object.keys(values)[0]].index] |
OlderNewer