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 | |
if (is_array($contrib)) { | |
foreach ($contrib as $person) $names[] = $person->FirstName . ' ' . ucwords($person->LastName); | |
} else if (isset($contrib)) $names[] = $contrib->FirstName . ' ' . ucwords($contrib->LastName); | |
if ($names) $contrib_str = implode(', ', $names); | |
$sessions[$key]['field_session_contributor_names_value'] = $contrib_str; |
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 | |
$options['shell-aliases'] = array( | |
'cd' => '!cd `drush dd`', | |
); |
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
diff --git a/drush.php b/drush.php | |
index 7a427af..c834dd0 100755 | |
--- a/drush.php | |
+++ b/drush.php | |
@@ -113,7 +113,7 @@ function drush_main() { | |
$return = ''; | |
} | |
- if (drush_get_context('DRUSH_DEBUG')) { | |
+ if (drush_get_context('DRUSH_DEBUG') && !drush_get_context('DRUSH_QUIET')) { |
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 | |
function blah_init() { | |
global $user; | |
if ($user->uid = 1) { | |
// do something | |
} | |
} |
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 | |
$contexts = ctools_context_handler_get_handler_contexts($base_contexts, $handler); | |
if (isset($handler->handler)) { | |
ctools_context_handler_pre_render($handler, $contexts, $args); | |
} | |
$context = $contexts[$handler->conf['content_type_render']]; | |
$conf['nid'] = $context->data->nid; |
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 | |
function welcom_user_load($profile_info) { | |
// Create a new view | |
$view = views_new_view(); | |
$view->name = 'welcom_user_lookup'; | |
$view->base_table = 'node'; | |
$view->is_cacheable = FALSE; | |
$view->api_version = 2; | |
$handler = $view->new_display('default', 'Defaults', 'default'); |
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 | |
$uid = db_result(db_query("SELECT n.uid | |
FROM content_type_profile ctp | |
LEFT JOIN node n ON ctp.nid = n.nid | |
WHERE field_blah_id_value = %d", $blah_id)); | |
$account = user_load($uid); |
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
# ANSI color codes | |
# Reset | |
Color_Off='\e[0m' # Text Reset | |
# Regular Colors | |
Black='\e[0;30m' # Black | |
Red='\e[0;31m' # Red | |
Green='\e[0;32m' # Green | |
Yellow='\e[0;33m' # Yellow |
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 | |
/* | |
* @file | |
* Tests for archive.drush.inc | |
*/ | |
class archiveDumpCase extends Drush_TestCase { | |
/* | |
* Test dump and extraction. |
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
" Format json using the "json" command from npm | |
func FJSON() | |
%! json | |
set filetype=javascript | |
nohl | |
normal! gg=G | |
endfu | |
com -nargs=* FJSON call FJSON() |