Add these files to your ~/.drush
directory or your Drupal project.
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 | |
* Build a dynamic list of drush aliases by identifying Drupal directories. | |
* | |
* The script will scan your webroot for Drupal directories. Place this in | |
* /etc/drush/aliases.drushrc.php | |
* | |
* @param $root | |
* The absolute path to your webroot. |
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
### | |
# Quick directory change for drush. | |
# While inside a Drupal site, simply cdd to a module or theme by name. | |
# Add an alias to quickly jump to that site's root or any theme or module within that site | |
# | |
# EX. | |
# $ cdd zen (takes you to zen theme within current Drupal site) | |
# $ cdd @mysite (takes to you mysite root) | |
# $ cdd @mysite zen (takes you to zen theme in mysite from anywhere on the server) | |
## |
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 | |
# | |
# Automatically add ticket numbers to commit messages using branch descriptions. | |
# Place this file in .git/hooks/commit-msg | |
# | |
# Add a description to your branch: | |
# git branch --edit-description [branch-name] | |
# | |
# Mark your ticket numbers anywhere in the description using the following | |
# syntax: |
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 | |
# | |
# Check for debugging statements before commiting your code. | |
# Place this file in the .git/hooks directory of your project. | |
# List of function names to search for in regex format | |
FUNCTIONS='dpm|kpr|qpr|console\.log' | |
# If any functions are found as executable, prevent the commit. | |
DIEONFAIL=false |
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 | |
# File: rename | |
# Author: Chris Albrecht (chris at lullabot dot com) | |
# | |
# Bulk renaming of files. | |
FROM=$1 | |
TO=$2 | |
FILTER=$3 |
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 | |
/** | |
* Template for hook_update_N() with batching. | |
*/ | |
function module_template_update_7100(&$sandbox) { | |
$items_per_loop = 100; | |
// Initial setup. | |
if (!isset($sandbox['processed'])) { | |
// Load the nids to update |
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 | |
# INSTRUCTIONS | |
# | |
# 1. Copy .git/hooks/commit-msg.sample to .git/hooks/commit-msg | |
# 2. Replace the contents of commit-msg with this file | |
# | |
# Automatically add ticket numbers to commit messages using branch names. | |
# | |
# Branches should be in the format [username]-[issue #]-[short-desc] | |
# |
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 | |
* Module class for the AwesomeCode module. | |
*/ | |
/** | |
* Class AwesomeCode. | |
* | |
* Container class for any custom functionality in the Awesome Code module. |
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
# Create a safe space for dangerous modules. | |
/sites/*/modules/ignored/ | |
/docroot/sites/*/modules/ignored/ |
OlderNewer