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
#! /usr/bin/env bash | |
# Finds the last modified CiviCRM ConfigAndLog file. | |
# Configure the ConfigAndLog dir in $LOG_DIR | |
# | |
# TIP: create a symlink to ConfigAndLog as a sibling of your project utils folder | |
# called logs, and you can use the default configs below. | |
pushd $(dirname $0) >/dev/null | |
__DIR__=$(pwd -P) |
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
SITE=sandbox-volunteer.leadercenter.org | |
HTDOCS=/home/leaderce/websites/$SITE/htdocs | |
DRUSH=/usr/local/bin/drush | |
pushd $HTDOCS > /dev/null | |
while read line ; do | |
read contact_id | |
$DRUSH cvapi --out=pretty \ |
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/sh | |
CP='cp -rp' | |
RM='rm -rf' | |
MAX=7 # keep MAX + 1 archives | |
SRC=$1 | |
MY_BU=$2 | |
# if second arg is not set, don't change bu name |
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
$participants = civicrm_api3('Participant', 'get', array( | |
'sequential' => 1, | |
'status_id' => "Registered", | |
'event_id' => array( | |
'IN' => $event_ids | |
), | |
// Get price set info if available in line below | |
'api.LineItem.get' => array('entity_table' => "civicrm_participant", 'entity_id' => "\$value.participant_id") | |
)) ['values']; |
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
-- Find suspect Memberships due to contributions being linked to multiple membership-payment records | |
SELECT | |
mempay.id AS mempay_id, | |
mempay.contribution_id AS contrib_id, | |
contrib.receive_date, contrib.total_amount, | |
mempay.membership_id AS mem_id, memtype.name, | |
c_contrib.display_name AS contrib_contact_name, c_contrib.id AS contrib_contact_id, | |
c_mem.id AS mem_contact_id, c_mem.display_name AS mem_contact_name |
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 | |
// MZD's JANKY CACHE | |
define('VKA_API_CACHE_DIR', '/home/vegeta85/public_html/sites/default/files/api-cache'); | |
$types = array('recipes', 'days', 'images','test'); | |
for ($d=1;$d < 32; $d++) { | |
$lastMonths = genFileNamesForDate($d, 'last'); | |
if ($lastMonths === FALSE) continue; |
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
# Various rewrite rules. | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteRule ^ - [E=vka_api_cache:sites/default/files/api-cache] | |
# Enable back-door and skip the rewriting | |
# Pass all requests not referring directly to files in the filesystem to | |
# index.php. Clean URLs are handled in drupal_environment_initialize(). |
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
diff --git a/CRM/ACL/BAO/ACL.php b/CRM/ACL/BAO/ACL.php | |
index 54962f9..205cb0b 100644 | |
--- a/CRM/ACL/BAO/ACL.php | |
+++ b/CRM/ACL/BAO/ACL.php | |
@@ -723,14 +723,54 @@ SELECT count( a.id ) | |
} | |
/** | |
+ * Build a join and where part for a 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
#!/usr/bin/php | |
<?php | |
$usage = "Given the ID of a field mapping (e.g., for imports), returns the SQL " | |
. "required to import the mapping into another system. The output *should* be pipeable " | |
. "to mysql (not tested).\n\nExample: " . basename($argv[0]) . " <id>"; | |
// TODO: if we did this as a drush script we could leave out all the DB stuff | |
// CONFIG // | |
$db_host = 'localhost'; | |
$db_name = 'test_drupal7_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
#!/usr/bin/env node | |
// this plugin replaces arbitrary text in arbitrary files | |
// remove strange appending of integer zero to versionCode | |
var fs = require('fs'); | |
var path = require('path'); | |
var rootdir = process.argv[2]; | |
var platform = process.env.CORDOVA_PLATFORMS; |