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
// Animated throbber | |
html.js .form-autocomplete { | |
background-image: image-url('svg/throbber-inactive.svg'); | |
background-position: 95% center; | |
background-position: -webkit-calc(100% - 5px) center; | |
background-position: calc(100% - 5px) center; | |
background-repeat: no-repeat; | |
} | |
html.js .throbbing { |
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 | |
/** | |
* @param tid | |
* Term ID | |
* @param child_count | |
* TRUE - Also count all nodes in child terms (if they exists) - Default | |
* FALSE - Count only nodes related to Term ID | |
*/ | |
function term_nc($tid, $child_count = TRUE) { | |
$tids = array($tid); |
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 | |
# BASH completion script for www function. | |
# | |
# You must run this script as root in order to be able to create the _www file in the /etc/bash_completion.d/ directory. | |
if [ ! -f /etc/bash_completion.d/_www ]; then | |
printf '_www() {\nlocal dirs=("/www/$2"*/); [[ -e ${dirs[0]} ]] && COMPREPLY=( "${dirs[@]#/www/}" );\n}' >> /etc/bash_completion.d/_www; | |
fi | |
grep -qs _www /etc/bash_completion |
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']['offline'] = 'variable-set -y --always-set maintenance_mode 1'; | |
$options['shell-aliases']['online'] = 'variable-delete -y --exact maintenance_mode'; | |
$options['shell-aliases']['sync-dbs'] = '!drush sql-sync --structure-tables-key=common --no-cache {{#prod}} {{@target}}'; | |
$options['shell-aliases']['sync-files'] = '!drush rsync {{#prod}}:%files {{@target}}:%files'; | |
$options['structure-tables']['common'] = array('cache', 'cache_filter', 'cache_menu', 'cache_page', 'history', 'sessions', 'watchdog'); | |
$options['shell-aliases']['sync-fsdb'] = '!drush sql-sync {{#prod}} {{@target}} && drush rsync {{#prod}}:%files {{@target}}:%files'; |
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 | |
$adam = array( | |
'remote-host' => 'adammalone.net', | |
'root' => '/var/www/html/adammalone/docroot', | |
'uri' => 'adammalone.net', | |
'strict' => 0, | |
'path-aliases' => array( | |
'%dump-dir' => '/home/adammalone/.drush/dumps', | |
'%files' => 'sites/default/files', |
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
find `pwd` -name config.rb | sed 's/config.rb//' | sed 's/^/cd /' | sed 's/$/;compass clean;compass compile/' | xargs -n4 | sh |
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 | |
########################################################################## | |
# | |
# mysql_backups.sh: A shell script to back up all MySQL databases in | |
# one shot, nightly, and keep a rolling 3 weeks of | |
# backups hot, online in the backup archive. | |
# | |
# Written by David A. Desrosiers | |
# Contact [email protected] | |
# Last updated Jun 27 2012 by Alessandro Feijó @afeijo |
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 | |
# | |
# Git pre-commit hook for Drupal projects. | |
# Created by Dave Hall - http://davehall.com.au | |
# Distributed under the terms of the WTFPL - http://www.wtfpl.net/ | |
# | |
set -e |
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_install(). | |
*/ | |
function power_one_install() { | |
// The "generation_site" entity type already exists at this point. | |
// Create a new entity bundle using ECK's API. | |
$new_bundle = function($name, $label, $entity_type) { |
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/sh | |
# | |
# For each ref, validate the commit. | |
# | |
# - It disallows deleting branches without a /. | |
# - It disallows non fast-forward on branches without a /. | |
# - It disallows deleting tags without a /. | |
# - It disallows unannotated tags to be pushed. |