Skip to content

Instantly share code, notes, and snippets.

View ralph-tice's full-sized avatar

Ralph Tice ralph-tice

  • Kentik
  • Texas
View GitHub Profile
@ralph-tice
ralph-tice / gist:5084164
Created March 4, 2013 18:03
basic release management for php type applications that only involve file copy
#!/bin/bash
#git pull
releaseDir=`date +%F-%H-%M-%S`
sudo mkdir -p /var/www/releases/$releaseDir
sudo chown ec2-user.ec2-user /var/www/releases/$releaseDir
#assumes docroot is the name of the directory in your repo to deploy
cp -r ./docroot /var/www/releases/$releaseDir/
var hzAdDebug = !1,
hzVersion = "4.11",
keywords, adCont, urlPrefix = "https:" == location.protocol ? "https://ssl14.ovh.net/~hoverzoo" : "http://hoverzoom.net";
function addAffiliateLinks() {
try {
if (0 != location.host.indexOf("www.amazon.")) {
var a = {
com: "-20",
fr: "-21",
@ralph-tice
ralph-tice / gist:5207813
Created March 20, 2013 19:43
graphite/carbon/whisper install
sudo yum install httpd
sudo yum install pycairo
sudo yum install mod_python
sudo yum install python-ldap
sudo yum install git clone [https://github.com/graphite-project/graphite-web.git]
@ralph-tice
ralph-tice / gist:5340216
Created April 8, 2013 20:31
httpd.conf: CustomLog |/usr/local/bin/pipe_syslog combined
#!/usr/bin/perl
use Sys::Syslog qw( :DEFAULT setlogsock );
setlogsock('unix');
openlog('apache', 'cons', 'pid', 'local2');
while ($log = <STDIN>) {
syslog('notice', $log);
}
closelog
@ralph-tice
ralph-tice / gist:5405052
Created April 17, 2013 15:05
2.9 vs 2.10.1
/**
* allow for hierarchical properties
* {{{
* if we have prefix = "edda.collection",
* propName = "enabled",
* nameContext = "test.us-east-1.aws.addresses"
* then it will look for (in this order):
* edda.collection.test.us-east-1.aws.addresses.enabled
* edda.collection.test.us-east-1.aws.enabled
* edda.collection.us-east-1.aws.addresses.enabled
jar 'com.netflix.hystrix:hystrix-core', '~>1.2.16'
https://papertrailapp.com/systems/setup
# sudo sh
# cd /etc
# wget https://papertrailapp.com/tools/syslog.papertrail.crt
# yum install rsyslog-gnutls
@ralph-tice
ralph-tice / gist:5672064
Created May 29, 2013 17:24
stuff installed on new macbook air
#Sublime Text 2 + Ensime for scala development
www.sublimetext.com/2
http://wbond.net/sublime_packages/package_control/installation
https://github.com/sublimescala/sublime-ensime
#x11 forwarding (xquartz)
http://xquartz.macosforge.org/landing/
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@ralph-tice
ralph-tice / gist:5759242
Created June 11, 2013 18:05
hadoop OSX bootstrap
wget http://apache.claz.org/hadoop/common/hadoop-1.2.0/hadoop-1.2.0-bin.tar.gz
gzip -d hadoop-1.2.0-bin.tar.gz
tar xvf hadoop-1.2.0-bin.tar
cd hadoop-1.2.0
mkdir input
cp ../conf/*.xml ./
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
export HADOOP_HOME=/Users/ralphtice/hadoop/hadoop-1.2.0/
export HADOOP_OPTS="-Djava.security.krb5.realm=OX.AC.UK -Djava.security.krb5.kdc=kdc0.ox.ac.uk:kdc1.ox.ac.uk"