Skip to content

Instantly share code, notes, and snippets.

View stovak's full-sized avatar
😀

Tom Stovall stovak

😀
View GitHub Profile
@stovak
stovak / gist:5272769
Created March 29, 2013 18:47
download the latest release RPM certs to a new install of red hat
#!/bin/sh
cd /tmp
curl http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/repodata/primary.sqlite.bz2 | bzip2 -dc > primary.sqlite
sqlite3 ./primary.sqlite "select url,location_href from packages where name like '%release%' order by name;"
## to do Take product of the third operation and replace "|" (pipe) with "/stable/Redhat/6/x86_64/" and pipe the result to:
# rpm -ivh $1
@stovak
stovak / gist:5570795
Last active December 17, 2015 07:09
basic virtual host
<VirtualHost *:80>
DocumentRoot /disk2/www/mktg-dev.apigee.com
ServerName mktg-dev.apigee.com
CustomLog "/var/log/httpd/mktg.log" combined
ErrorLog "/var/log/httpd/mktg.log"
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /disk2/www/mktg-dev.apigee.com
$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"
)){
@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
<?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: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';
@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
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.
"
<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.