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
# fetching a copy of the repo | |
vayo:tmp chris$ git clone --branch 7.x-1.x grobot@git.drupal.org:project/uc_paymentexpress.git | |
Cloning into uc_paymentexpress... | |
remote: Counting objects: 170, done. | |
remote: Compressing objects: 100% (117/117), done. | |
remote: Total 170 (delta 111), reused 79 (delta 53) | |
Receiving objects: 100% (170/170), 71.57 KiB | 27 KiB/s, done. | |
Resolving deltas: 100% (111/111), done. | |
vayo:tmp chris$ cd uc_paymentexpress/ |
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 | |
if [ -z $1 ] ; then | |
SQL=" | |
SELECT | |
CONCAT(table_schema, '.', table_name) 'Table', | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') 'Tot Size', | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') 'Rows', | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') 'Data', | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') 'Idx', |
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 | |
/** | |
* Handle a create event | |
* | |
* @param array $params | |
* @return array | |
*/ | |
function civicrm_api3_mailing_create($params, $ids = array()) { | |
$required = array( |
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 | |
function nzg_debug_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { | |
switch ($op) { | |
case 'insert': | |
case 'update': | |
$debug = array( | |
'request' => $_REQUEST, | |
'server' => $_SERVER, | |
'node' => $node, |
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
vayo:example-capistrano chris$ date ; cap uat deploy | |
Wed 4 Apr 2012 23:52:26 NZST | |
* executing `uat' | |
triggering start callbacks for `deploy' | |
* executing `multistage:ensure' | |
* executing `deploy' | |
* executing `deploy:update' | |
** transaction: start | |
* executing `deploy:update_code' | |
updating the cached checkout on all servers |
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 | |
/** | |
* @file views_plugin_query_default.inc | |
* Defines the default query object which builds SQL to execute using the | |
* Drupal database API. | |
*/ | |
/** | |
* Object used to create a SELECT query. | |
*/ |
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
namespace :drush do | |
task :backupdb do | |
end | |
task :othertask | |
# boring | |
long_complex_tasks | |
very_boring | |
and_complex | |
end | |
end |
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 | |
/** | |
* Aegir user has lots of aliases. Let's load for developers too. | |
*/ | |
global $aliases; | |
foreach(glob('/var/aegir/.drush/*alias.drushrc.php') as $aegir_alias) { | |
require_once($aegir_alias); | |
} |
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 | |
/* | |
+--------------------------------------------------------------------+ | |
| CiviCRM version 4.1 | | |
+--------------------------------------------------------------------+ | |
| Copyright CiviCRM LLC (c) 2004-2011 | | |
+--------------------------------------------------------------------+ | |
| This file is a part of CiviCRM. | | |
| | |
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
--- /tmp/civicrm/CRM/Upgrade/Incremental/sql/2.2.alpha1.mysql.tpl 2009-04-14 19:16:47.000000000 +1200 | |
+++ ./CRM/Upgrade/Incremental/sql/2.2.alpha1.mysql.tpl 2012-05-06 11:01:06.000000000 +1200 | |
@@ -15,7 +15,7 @@ | |
-- make the register_by_id cascade in civicrm_participant | |
ALTER TABLE `civicrm_participant` | |
- DROP FOREIGN KEY `FK_civicrm_participant_registered_by_id`; | |
+ DROP KEY `FK_civicrm_participant_registered_by_id`; | |
ALTER TABLE `civicrm_participant` | |
ADD CONSTRAINT `FK_civicrm_participant_registered_by_id` FOREIGN KEY (`registered_by_id`) REFERENCES `civicrm_participant` (`id`) ON DELETE CASCADE; |