Skip to content

Instantly share code, notes, and snippets.

View stovak's full-sized avatar
😀

Tom Stovall stovak

😀
View GitHub Profile
<?php
/**
* file "orange.php"
* Ordinarily I wouldn't put everything in one file,
* but for this case, it will make the exercise much
* simpler and easier to run locally
*
* @author stovak
*/
(function($){
//function lines
})(jQuery)
function nebula_audit_entity_update($entity, $type) {
$orig_wrapper = entity_metadata_wrapper($type, $entity->original);
$new_wrapper = entity_metadata_wrapper($type, $entity);
$properties = $orig_wrapper->getPropertyInfo();
$diffs = array();
foreach ($properties as $key => $property) {
$old = $orig_wrapper->$key->value();
$new = $new_wrapper->$key->value();
if ($old !== $new) {
if (is_array($old)) {
<exec command="ln -s default prod-${orgname}" logoutput="true" dir="CODEDIR/sites" />
<exec command="ln -s ../all/{modules,themes} ." logoutput="true" dir="CODEDIR/sites/default" />
add to git repo, checkin and push.
if [[ $PLATFORM_NAME == "Redhat" ]]; then
display_header "
In order to a redhat install, we must download RPMs directly from RedHat. In order to do that, we must first register this system with redhat.
This requires a subscription to the RedHat network.
"
@stovak
stovak / gist:6831032
Created October 4, 2013 19:05
Logfile from target migration
Started by user ha:AAAAoh+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAzuEgZx/dLi1CL94pL8ssRsh8SCzPTUVKDWXADKxjfDzAAAAA==Tom Stovall
Building in workspace /disk2/jenkins/jobs/9999 - migrate instance to pantheon/workspace
looking for '/disk2/jenkins/jobs/9999 - migrate instance to pantheon/workspace/apigee_build.xml' ...
use '/disk2/jenkins/jobs/9999 - migrate instance to pantheon/workspace' as a working directory.
[workspace] $ phing -buildfile "/disk2/jenkins/jobs/9999 - migrate instance to pantheon/workspace/apigee_build.xml" [email protected] -Denvironment=prod [email protected] -Dorgname=target ******** migrate-to-pantheon -logger phing.listener.DefaultLogger
Buildfile: /disk2/jenkins/jobs/9999 - migrate instance to pantheon/workspace/apigee_build.xml
[property] Loading /disk2/jenkins/.s3cfg
ha:AAAAZB+LCAAAAAAAAP9b85aBtbiIQSejNKU4P0+vIKc0PTOv
@stovak
stovak / gist:6439797
Last active December 22, 2015 07:39
<?php
require_once (dirname(__FILE__)."/modules/custom/devconnect/lib/Apigee/Exceptions/InstallException.php");
require_once (dirname(__FILE__)."/modules/custom/devconnect/lib/Apigee/Util/Crypto.php");
function apigee_install_select_profile(&$install_state) {
$install_state['parameters']['profile'] = 'apigee';
<?php
if (defined('PANTHEON_ENVIRONMENT')) {
// Use Redis for caching.
$conf['redis_client_interface'] = 'PhpRedis';
$conf['cache_backends'][] = 'profiles/apigee/modules/contrib/redis/redis.autoload.inc';
$conf['cache_default_class'] = 'Redis_Cache';
$conf['cache_prefix'] = array('default' => 'pantheon-redis');
// Do not use Redis for cache_form (no performance difference).
@stovak
stovak / gist:6222766
Last active December 21, 2015 00:48
connect thru the jump gate
#!/bin/bash
ssh -A -t jumpeast.apigee.net ssh $1
$url = parse_url($_SERVER["SCRIPT_URI"]);
$apath = explode("/", $url['path']);
if ( (
$_SERVER['HTTP_HOST'] == "mktg-dev.apigee.com" ||
$_SERVER['HTTP_HOST'] == "mktg-stg.apigee.com" ||
$_SERVER['HTTP_HOST'] == "apigee.com"
) && (
$apath[1] != "about"
)){