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
"Enable filetype detection | |
:filetype on | |
"General settings | |
set incsearch "Find as you type | |
set ignorecase "Ignore case in search | |
set scrolloff=2 "Number of lines to keep above/below cursor | |
set smartcase "Only ignore case when all letters are lowercase | |
set number "Show line numbers | |
set wildmode=longest,list "Complete longest string, then list alternatives |
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
diff --git a/lib/cradle.js b/lib/cradle.js | |
index 7700ff6..db5e2a5 100644 | |
--- a/lib/cradle.js | |
+++ b/lib/cradle.js | |
@@ -509,7 +509,9 @@ cradle.Connection.prototype.database = function (name) { | |
} | |
if (options && options.keys) { | |
- this.query('POST', path, {}, options, args.callback); | |
+ var keys = options.keys; |
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 | |
/** | |
* Form submit... | |
*/ | |
function my_module_submit($form, $form_state) { | |
$email = $form_state['values']['email']; | |
$message_type = $form_state['values']['message_type']; | |
$params = array('form_values' => $form_state['values']); | |
drupal_mail('my_module', $message_type, $email, language_default(), $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
$form['my_text_field'] = array( | |
'#type' => 'text_format', | |
'#base_type' => 'textfield', | |
'#title' => t('My Text'), | |
'#default_value' => '', | |
'#format' => 'filtered_html', | |
); |
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 (!extension_loaded('pdo')) { | |
dl('pdo.so'); | |
} |
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
$element = array( | |
'#type' => 'markup', | |
'#markup' => t('...'), | |
'#prefix' => '<h2>', | |
'#suffix' => '</h2>' | |
); |
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
/** | |
* Implements hook_theme(). | |
*/ | |
function HOOK_theme($existing, $type, $theme, $path) { | |
return array( | |
'h2' => array( | |
'variables' => array('text' => NULL, 'args' => NULL), | |
), | |
); | |
} |
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 module_invoke_last($hook) { | |
$args = func_get_args(); | |
// Remove $hook from the arguments. | |
unset($args[0]); | |
$result = null; | |
foreach (module_implements($hook) as $module) { | |
$function = $module . '_' . $hook; | |
if (function_exists($function)) { | |
$result = call_user_func_array($function, $args); | |
} |
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
/** | |
* Field handler to provide simple renderer that calls function to record | |
* radioactivity of the node being viewed. | |
*/ | |
class mcard_handler_field_node_radioactivity extends views_handler_field_node { | |
function render($values) { | |
if (module_exists('radioactivity')) { | |
radioactivity_node_user_node_view($values->nid); | |
} | |
return $this->render_link(check_plain($values->{$this->field_alias}), $values); |
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
diff --git a/servers/Route.bones.js b/servers/Route.bones.js | |
index b78dc77..67fc8b5 100644 | |
--- a/servers/Route.bones.js | |
+++ b/servers/Route.bones.js | |
@@ -95,7 +95,7 @@ server.prototype.loadCollection = function(req, res, next) { | |
req.collection = new this.models[name]([], req.query); | |
var options = { | |
success: function(collection, resp) { | |
- res.send(resp, headers); | |
+ res.send(resp, _.extend(_.result(model, 'headers') || {}, headers)); |
OlderNewer