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
#!/bin/bash | |
# This is a general-purpose function to ask Yes/No questions in Bash, either | |
# with or without a default answer. It keeps repeating the question until it | |
# gets a valid answer. | |
ask() { | |
# http://djm.me/ask | |
while true; do |
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
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = /robots.txt { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} |
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
# Set binary paths. | |
set PATH /usr/local/bin $PATH | |
set PATH ~/bin $PATH | |
set PATH ~/.config/composer/vendor/bin $PATH | |
set PATH echo (ruby -e 'print Gem.user_dir')/bin $PATH | |
set -x COMPOSER_DISABLE_XDEBUG_WARN 1 | |
# Start X at login on TTY1 | |
if status --is-login |
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 | |
/** | |
* Handle cases where we're handed a URI, or local filespec. Extra functionallity: Allow saving file entity fields. | |
*/ | |
class MigrateEntityFileUri extends MigrateFileUri { | |
public function __construct($arguments = array(), $default_file = NULL) { | |
parent::__construct($arguments, $default_file); | |
if (isset($arguments['fields'])) { | |
$this->fields = $arguments['fields']; |
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 | |
/** | |
* Implements hook_views_pre_view(). | |
*/ | |
function hook_views_pre_view(&$view, &$display_id, &$args) { | |
$foo = 'bar'; | |
} | |
/** |
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 | |
// Can be called with '$ drush php-scrip /path/to/dcron.php' | |
global $timers; | |
$hook = "cron"; | |
$return = array(); | |
$queues = module_invoke_all("cron_queue_info"); | |
drupal_alter("cron_queue_info", $queues); | |
foreach (module_implements($hook) as $module) { |