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 | |
# usage: drupal-quick-dump user host database D8 ("D8" is optional) | |
# remember to chmod u+x drupal-quick-dump.sh | |
BOLD="$(tput bold)" | |
RED="$(tput setaf 1)" | |
GREEN="$(tput setaf 2)" | |
MAG="$(tput setaf 5)" | |
RESET="$(tput sgr0)" | |
USER="$1" |
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 | |
* local.settings.php | |
* | |
* This settings file is intended to contain settings specific to a local | |
* development environment, by overriding options set in settings.php. | |
* | |
* Include this file from your regular settings.php by including this at the | |
* bottom: |
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
if [ -d "$1/sites" ]; then | |
cur_dir=`pwd` | |
echo $cur_dir | |
cd $1 | |
echo `pwd` | |
echo "chmod directories" | |
find . -type d -exec chmod u=rwx,g=rx,o=rx {} \; | |
echo "chmod files" | |
find . -type f -exec chmod u=rw,g=r,o=r {} \; | |
echo "chmod sites/default/files" |
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
#!/usr/bin/perl -w | |
use constant SITEMAP => "http://v.box:10144/sitemap.xml"; | |
use constant MAX_PAGES => 10; | |
$npages = 0; | |
for (qx{curl --silent @{[SITEMAP]}}) { | |
m{<loc>(.*?)</loc>} or next; | |
$page = $1; | |
++$npages > MAX_PAGES and last; |
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
settings.php | |
.git | |
.gitignore | |
private/backup_migrate/ |
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 vhost { | |
sudo ~/.dotfiles/osx/mamp_vh.sh $1 | |
} |
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 | |
while read line | |
do | |
URL=http://example.dev/$line | |
# echo $URL `curl -s --head $URL | head -n 1` | grep -v 200 # use to find any non-200 results | |
echo $URL `curl -s --head $URL | head -n 1` | |
done < $1 |
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 | |
# determine location of this script | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# load server list that these functions loop through | |
source $DIR/aliasservers.sh | |
# identify all drupal sites | |
listAllSites () { |
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
#!/usr/bin/env bash | |
echo "what is your root domain name, something like 'colab-sbx-110.oit.unicorn.edu'" | |
read rootdomain | |
echo "update apt-get" | |
sudo apt-get update | |
echo "install git" | |
sudo apt-get -y install git | |
echo "install vim" | |
sudo apt-get -y install vim |
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
/** | |
* Implementation of hook_entity_info_alter(). | |
* | |
* Redirect any links to groups taxonomy terms to their corresponding node | |
* page. | |
*/ | |
function term_redirect_entity_info_alter(&$entity_info) { | |
$entity_info['taxonomy_term']['uri callback'] = 'term_redirect_taxonomy_term_uri'; | |
} | |
OlderNewer