Skip to content

Instantly share code, notes, and snippets.

View CashWilliams's full-sized avatar

Cash Williams CashWilliams

View GitHub Profile
@CashWilliams
CashWilliams / gist:3029850
Created July 1, 2012 22:23
Drupal feature stuck
/var/www/cashwilliams/sites/default# drush fu cashwilliams_core
Module appears to already exist in sites/all/modules/features/cashwilliams_core
Do you really want to continue? (y/n): y
Created module: cashwilliams_core in sites/all/modules/features/cashwilliams_core [ok]
li117-19:/var/www/cashwilliams/sites/default# drush fl
Name Feature Status State
CashWilliams Core cashwilliams_core Enabled Overridden
CashWilliams Blog cashwilliams_blog Enabled
CashWilliams Twitter cashwilliams_twitter Enabled
Date Migration Example date_migrate_example Disabled
@CashWilliams
CashWilliams / fix_prefix.php
Created June 29, 2012 02:28
Drupal 7 drush script to remove database prefix
<?php
// current table prefix to be removed
$prefix = "drup_";
// echo generated statments rather then run them
$pretend = FALSE;
/////////////////////////////////////////////////////////////////////
$table_list = db_query("SHOW TABLES");
@CashWilliams
CashWilliams / bad_drupal_lib.inc
Created June 22, 2012 17:32
Bad Drupal database connection
...
if(strstr(ini_get('sendmail_from'), 'dev')) {
$config['datasources']['default']['hostname'] = 'localhost';
$config['datasources']['default']['username'] = 'root';
$config['datasources']['default']['password'] = 'root';
} else {
$config['datasources']['default']['hostname'] = 'badexample.com';
$config['datasources']['default']['username'] = 'badexample_user';
$config['datasources']['default']['password'] = 'badexample_pass';
}
@CashWilliams
CashWilliams / install.hostmaster.inc
Created August 10, 2011 01:29
AEgir - hostmaster install for non-standard install (osx based)
<?php
/**
* This file helps install aegir on osx, not using the standard AEgir user
* create a host entry for your machine name (Cash-Williamss-MacBook-Pro.local)
* run drush hostmaster-install --aegir_root=/path/to/aegir
*/
/**