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 logDrupalDatabaseQuery($query) { | |
| // Log the query string. | |
| $tmp = $query->__toString(); | |
| // Reverse array to avoid a placeholder ending in .._1 replacing placeholders ending in .._1n | |
| foreach (array_reverse($query->getArguments()) as $key => $value) { | |
| if (is_string($value)) { | |
| $value = '"' . $value . '"'; | |
| } | |
| $tmp = str_replace($key, $value, $tmp); |
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
| set-option -g prefix C-a | |
| bind-key C-a last-window | |
| set -s escape-time 0 | |
| bind H resize-pane -L 10 | |
| bind J resize-pane -D 10 | |
| bind K resize-pane -U 10 | |
| bind L resize-pane -R 10 | |
| bind | split-window -h -c '#{pane_current_path}' | |
| bind - split-window -v -c '#{pane_current_path}' | |
| setw -g mode-keys vi |
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 | |
| /** | |
| * @file | |
| * The PHP page that serves all page requests on a Drupal installation. | |
| * | |
| * All Drupal code is released under the GNU General Public License. | |
| * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory. | |
| */ |
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 | |
| /** | |
| * @file | |
| * Router script for the built-in PHP web server. | |
| * | |
| * The built-in web server should only be used for development and testing as it | |
| * has a number of limitations that makes running Drupal on it highly insecure | |
| * and somewhat limited. | |
| * |
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
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| PROMPT_DIRTRIM=1 | |
| export PS1="\[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " |
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 | |
| branch=`git branch |egrep "^\*" |tr -d '* '` | |
| msg=`git log |head -n 5 |tail -n 1` | |
| echo "`date` $branch $msg" >>~/gitlog.txt | |
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 | |
| if [ $3 -eq 1 ]; then | |
| branch=`git branch |egrep "^\*" |tr -d '* '` | |
| echo "`date` -> $branch" >>~/gitlog.txt | |
| fi |
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
| <div class="visible-xs">XS</div> | |
| <div class="visible-sm">SM</div> | |
| <div class="visible-md">MD</div> | |
| <div class="visible-lg">LG</div> |
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 | |
| if [ ! -f "$1" -o ! -f "$2" ] | |
| then | |
| echo "Run with $0 src.less dest.css" | |
| exit 1 | |
| fi | |
| if [ ${1: -5} != ".less" -o ${2: -4} != ".css" ] | |
| then |
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 THEME_preprocess_webform_form(&$vars) { | |
| /* | |
| Add a special template for an individual page of a webform. | |
| e.g. for the first page of a webform with a node id of 12: webform-form-12-0.tpl.php | |
| */ | |
| $vars['theme_hook_suggestions'][] = $vars['theme_hook_suggestion']; | |
| $vars['theme_hook_suggestions'][] = 'webform_form_' . $vars['nid'] . '_' . $vars['form']['progressbar']['#page_num']; | |
| // The theme_hook_suggestion would override all suggestions so unset it. | |
| unset($vars['theme_hook_suggestion']); | |
| } |
NewerOlder