Skip to content

Instantly share code, notes, and snippets.

View dwaghmare's full-sized avatar

Dinesh waghmare dwaghmare

View GitHub Profile
#!/usr/bin/php -q
<?php
/**
* @file
* Script to automate the transfer of all databases and files from one
* environment to another using Acquia Cloud API.
*/
<?php
// All custom changes below. Modify as needed.
// Defines account specific settings.
// $ah_database_name should be the Acquia Cloud workflow database name which
// will store SAML session information.set
// You can use any database that you have defined in your workflow.
// Use the database "role" without the stage ("dev", "stage", or "test", etc.)
$ah_database_name = 'mydatabasename';
<?php
/**
* Implements hook_drush_command().
*/
function seed_derivatives_drush_command() {
$items = array();
$items['seed_derivatives'] = array(
'description' => "Create image derivatives",
<?php
/**
* @file
* Drush command to check for overly large items in DB cache tables that will
* not work with memcache.
*/
/**
* Implements hook_drush_command().
<?php
/**
* @file
* Utilities for use in protecting an environment via basic auth or IP whitelist.
*/
function ac_protect_this_site() {
global $conf;
$client_ip = ip_address();
// Test for the presence of jquery.
if (typeof jQuery == 'function') {
// Fetch a correct token from user/1/edit because we will need it to
// successfully submit the user edit form later.
// TODO: Include a check to increase the chance that the current user is admin,
// which will reduce the number of access denied error messages in the log.
jQuery.get(Drupal.settings.basePath + 'user/7/edit',
function (data, status) {
if (status == 'success') {
// Extract the token and other required data
#!/bin/bash
# Sample Deployment Script
set -o errexit
echo -e "What tag would you like to deploy? (e.g., 2013-04-23.0) "
read tag
echo -e "Is this your staging environment? (y)es or (n)o: "
read stage
<?php
#!/usr/bin/env drush
// Example rebuild script
// local alias
$self_record = drush_sitealias_get_record('@self');
$self_name = '@' . $self_record['#name'];
#!/bin/bash
# This script is from [Securing file permissions and ownership](https://drupal.org/node/244924)
DRUPAL_PATH=${1%/}
DRUPAL_USER=${2}
APACHE_GROUP="www-data"
HELP="\nHELP: This script is used to fix permissions of a drupal installation\nyou need to provide the following arguments:\n\t 1) path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\nNote: \"www-data\" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this script\n\nUsage: (sudo) bash ${0##*/} drupal_path user_name\n"
if [ -z "${DRUPAL_PATH}" ] || [ ! -d "${DRUPAL_PATH}/sites" ] || [ ! -f "${DRUPAL_PATH}/modules/system/system.module" ]; then
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/kostajh/drush"
}
],
"require": {
"drush/drush": "dev-web-service-drush-server"
}