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
| __drush_ps1() { | |
| local s | |
| s="$(drush site-get)" | |
| [[ -n "$s" ]] && printf "${1:- (%s)}" "$s" | |
| } | |
| drushprompt='$(__drush_ps1 "[%s]")' | |
| gitprompt='$(__git_ps1 "(%s)")' | |
| case "$OS" in |
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
| # Install core software. | |
| case node.platform | |
| when "ubuntu" | |
| package_provider = Chef::Provider::Package::Apt | |
| package "curl" | |
| include_recipe "apt" | |
| cookbook_file "/etc/apt/sources.list.d/google-chrome.list" | |
| execute "add-chrome-key" do |
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
| gitalias() { | |
| local alias="${1%%=*}" command="${1#*=}" | |
| local prog="${command##git }" | |
| prog="${prog%% *}" | |
| alias $alias="$command" | |
| gitcomplete "$alias" "$prog" | |
| } | |
| gitcomplete() { | |
| local alias="$1" command="$2" |
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 drush_phpass_pre_pm_disable($disable) { | |
| if ($disable == 'phpass') { | |
| drush_set_error(dt("YOU SHALL NOT DISABLE PHPASS!!!")); | |
| } | |
| } |
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
| #!/bin/bash | |
| TAG="${1}" | |
| BRANCH="branch-${TAG}" | |
| if [[ -n $TAG ]] | |
| then | |
| echo "git co 7.x-4.x" | |
| git co 7.x-4.x | |
| echo "git co -b $BRANCH" | |
| git co -b $BRANCH |
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 | |
| $result = db_query("SHOW TABLES"); | |
| while ($t = db_result($result)) { | |
| db_query("ALTER TABLE %s ENGINE = InnoDB", $t); | |
| } |
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
| include_recipe "beanstalkd" | |
| include_recipe "waiting_queue" | |
| queues = %w{welcom_events_agenda welcom_events_agenda_user welcom_events_bookmark welcom_events_watchlist} | |
| queues.each do |q| | |
| drush_worker q do | |
| cookbook "waiting_queue" | |
| drupal_docroot "/var/www/welcom" | |
| nice 10 |
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 | |
| $options['application'] = 'blah'; | |
| $options['deploy-repository'] = 'http://git.drupal.org/project/drush_make.git'; | |
| deploy_before('symlink', 'blahtask'); | |
| deploy_task('blahtask', function($config) { | |
| drush_print_r($config); | |
| }); |
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/commands/pm/package_handler/git_drupalorg.inc b/commands/pm/package_handler/git_drupalorg.inc | |
| index fe933e8..39d3075 100644 | |
| --- a/commands/pm/package_handler/git_drupalorg.inc | |
| +++ b/commands/pm/package_handler/git_drupalorg.inc | |
| @@ -215,10 +215,10 @@ function drush_gitcache_add_project($gitcache, $request, $repository) { | |
| if (drush_get_context('DRUSH_VERBOSE')) { | |
| $command .= ' --verbose --progress '; | |
| } | |
| - $command .= '%s'; | |
| - if (drush_shell_cd_and_exec($tmpdir, $command, $repository)) { |
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 | |
| $foo = array( | |
| 'föö' => 'bår', | |
| ); | |
| file_put_contents('blah.txt', json_encode($foo)); | |
| $bar = json_decode(file_get_contents('blah.txt')); | |
| var_dump($bar); |