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 | |
# | |
# takes an argument of pantheon environment and | |
# returns output of all entites targeted in entityreference fields | |
# | |
# | |
# | |
PANTHEON_ENV="$1" | |
ALL=() |
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/local/bin/php | |
<?php | |
/** | |
* | |
* @param [type] $address1 [description] | |
* @param [type] $address2 [description] | |
* @return [type] [description] | |
*/ | |
function byemail($address1, $address2) { | |
return strcasecmp( |
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 | |
PANTHEON_ENV="$1" | |
echo $'$phenomena = array( | |
"afterimage", | |
"albedo", | |
"amplification", | |
"atoms and particles", | |
"attention", | |
"bernouli effect ", | |
"centripical force", |
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 | |
ALIAS_PATTERN="$1" | |
ENTITY_TYPE="$2" | |
ENTITY_BUNDLE="$3" | |
PANTHEON_ENV="$4" | |
drush @pantheon.exploratorium.$PANTHEON_ENV vset pathauto_${ENTITY_TYPE}_${ENTITY_BUNDLE}_pattern $ALIAS_PATTERN | |
drush @pantheon.exploratorium.$PANTHEON_ENV vset pathauto_update_action 2 | |
SCR=" \$query = new EntityFieldQuery(); | |
\$query->entityCondition('entity_type', '${ENTITY_TYPE}')->entityCondition('bundle', '${ENTITY_BUNDLE}'); | |
\$result = \$query->execute(); |
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 | |
# dump | |
mongodump -vvv -d hmm-local-beta --gzip --excludeCollection=users --archive=/Path/to/mongo/archive.gz | |
# old way, container runs out of memory :( | |
#scp -i ~/.ssh/cert_rsa ~/Path/to/mongo/archive.gz root@[remote host]:/root/import/ | |
##ssh -i ~/.ssh/cert_rsa root@[remote host] "mongorestore -vvv --drop --gzip --stopOnError --archive=/root/import/hmm.gz" | |
# new way - tunnel - this way we use local memory :) |
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 | |
PANTHEON_ENV="$1" | |
# delete old calendar nodes to free up aliases | |
echo 'node_delete_multiple(array(13,82,3186,3219,3250,3251,3264,4656,4838,4858,4955,5216,5248,5250,5261,5292,6794,6795,8360,8361,8362,8358,8352,8355,9147));' | drush @pantheon.exploratorium.$PANTHEON_ENV php-script - | |
# enable features | |
drush @pantheon.exploratorium.$PANTHEON_ENV en explo_feature_event_calendar_views -y | |
# revert features | |
drush @pantheon.exploratorium.$PANTHEON_ENV fr explo_feature_event_type -y | |
# remove old event views made for after dark | |
drush @pantheon.exploratorium.$PANTHEON_ENV dis explo_event_views -y |
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
on run argv | |
tell application "System Events" | |
set desktopCount to count of desktops | |
repeat with desktopNumber from 1 to desktopCount | |
tell desktop desktopNumber | |
set picture to item 1 of argv | |
end tell | |
end repeat | |
end tell | |
--beep |
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 | |
/** | |
* Alters the past events view query to look up event type nodes with a featured program tagged with the contextual filter value | |
* @param [type] &$view [description] | |
* @param [type] &$query [description] | |
* @return [type] [description] | |
*/ | |
function debug_module_views_query_alter(&$view, &$query) { | |
if (in_array('after_dark_context_past', $query->options['query_tags'])) { | |
$value = isset($query->where[0]['conditions'][0]['value'][':field_data_field_event_series_field_event_series_tid1']) ? $query->where[0]['conditions'][0]['value'][':field_data_field_event_series_field_event_series_tid1'] : false; |
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 | |
/* | |
* Helper function | |
*/ | |
function entity_tag_action_format_tid_array($tids) { | |
$formatted = array(); | |
foreach ($tids as $tid) { | |
if (is_numeric($tid)) { | |
$formatted[] = array('tid' => $tid); | |
} else if (is_array($tid) && $tid['tid'] == 'autocreate') { |