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 | |
DIR=`pwd` | |
if [ -d "$DIR/builds" ] | |
then | |
CURRENT=`ls -1 builds | sort | tail -1` | |
read -p "Do you want to remove all the old builds except $CURRENT (y/n)" -n 1 -s REMOVE_OLD_BUILDS |
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 | |
cd `drush dd` | |
sudo chown [user]:[group] -R . | |
sudo find . -type d -exec chmod u=rwx,g=rx,o= '{}' \; | |
sudo find . -type d -exec chmod u=rwx,g=rx,o= '{}' \; | |
cd sites | |
for d in ./*/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
<?php | |
/** | |
* Implements hook_install(). | |
*/ | |
function hook_install() { | |
// Create Contact form from data file | |
// Define your components. |
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 dnsmasq | |
sudo apt-get install dnsmasq | |
# Add lines to a configuration file in /etc/dnsmasq.d | |
# Don't use .local as address. That won't work. | |
nano dnsservers | |
> server=8.8.8.8 | |
> server=8.8.4.4 |
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 | |
# | |
# Include this script in your .bashrc like this: | |
# . ~/scripts/kwscripts | |
ROOT="/home/vhosts/" | |
function kws() { | |
project=$1 | |
vhosts=$ROOT |
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 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# Git ref to checkout in the ./src directory | |
NO_FETCH=$2 | |
REF=$1 | |
# Don't use - or . in the project name! | |
PROJECT=`basename $DIR` |
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 | |
# Reset | |
sudo rm -rf cnf/settings.php | |
sudo rm -rf cnf/files | |
sudo rm -rf builds | |
sudo rm -rf build | |
sudo rm -rf src | |
# Create new project. |
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
/** | |
* Implements hook_permission(). | |
*/ | |
function ZZMODULE_permission() { | |
$perms = array(); | |
// Allow access to certain pages based on this permissions | |
$perms['administer XX'] = array( | |
'title' => t('Administer [ZZMODULE] settings'), | |
'description' => t('Administer the settings of [ZZMODULE].') |
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: sh update.sh fase | |
# fase-1 or empty makes the pull | |
# fase-2 executes the script | |
# | |
# If you want to run a specific version checkout that | |
# version first in the src folder with git checkout [ref]. | |
# Don't use a branch there because it still does a pull | |
# on the branch (if it is setup as a tracking 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 | |
ctools_include('context'); | |
ctools_include('content'); | |
// Load ctools context from the arguments. | |
$context = array(); | |
$context_arguments = array( | |
'identifier' => 'node', // Required: Identifier to the panel. | |
'name' => 'entity_id:node', // Required: Identifier used by argument plugins. | |
'title' => 'Node', // Optional. |
OlderNewer