Skip to content

Instantly share code, notes, and snippets.

View acouch's full-sized avatar

Aaron Couch acouch

  • Philadelphia, PA
View GitHub Profile
@acouch
acouch / ubuntu puppet server passenger install.txt
Created September 12, 2012 20:01 — forked from andys/ubuntu puppet server passenger install.txt
Steps for installing puppet master in Ubuntu 10.04 with ruby 1.8 and passenger
# Puppet Install steps for Ubuntu 10.04, ruby 1.8, and passenger
apt-get -y install build-essential
apt-get -y install bsubversion apache2 libcurl4-openssl-dev libssl-dev mysql-server
apt-get -y install zlib1g-dev apache2-prefork-dev libapr1-dev libaprutil1-dev
apt-get -y install ruby ruby-dev libxmlrpc-ruby libopenssl-ruby libshadow-ruby1.8 irb rdoc libopenssl-ruby1.8 libruby
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
tar -xvzf rubygems*z
cd rubygems-1.3.7
@acouch
acouch / pressflow.diff
Last active December 23, 2015 17:48
Drupal 7.23 vs Pressflow 7
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index d27f8d1..44f3c72 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -717,6 +717,22 @@ function drupal_settings_initialize() {
}
$is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
+ // Load environmental config, if present.
+ if (isset($_SERVER['PRESSFLOW_SETTINGS'])) {
@acouch
acouch / gist:9784746
Created March 26, 2014 14:33
Click on a leaflet map icon in behat using a custom assumption
// Leaflet icons don't haave ids (at least the ones I'm using). Here we can click them by the z-index which is
// the only unique id.
/**
* Click on map icon as identified by its z-index.
*
* @Given /^I click map icon number "([^"]*)"$/
*/
public function iClickMapIcon($num) {
$session = $this->getSession();
@acouch
acouch / drushrc.php
Last active August 29, 2015 14:04
drush alias lookup
<?php
function findFiles($base_dir, $asset_dir, $extensions = array()) {
function glob_recursive($base_dir, &$directories = array()) {
foreach(glob($base_dir, GLOB_ONLYDIR | GLOB_NOSORT) as $folder) {
$directories[] = $folder;
glob_recursive("{$folder}/*", $directories);
}
}
glob_recursive($base_dir, $directories);
$files = array();
@acouch
acouch / index.html
Created December 11, 2014 20:12
NVD3 Stacked Area Chart using CartoDBs SQL API
<!doctype html>
<meta charset="UTF8">
<html>
<head>
<title>Tornadoes total versus max damage</title>
<meta name = "viewport" content = "initial-scale = 1, user-scalable = no">
<script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.js"></script>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.2/d3.js" charset="utf-8"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.js"></script>
@acouch
acouch / gist:93dee6b51b2da4178aaf
Created December 17, 2014 23:23
ckan puppet vagrant extra
curl -L https://npmjs.org/install.sh | sh
sudo apt-get install curl
curl -L https://npmjs.org/install.sh | sh
sudo curl -L https://npmjs.org/install.sh | sh
ls
cd npm/
ls
scripts/install.sh
sudo scripts/install.sh
npm install less nodewatch
@acouch
acouch / index.html
Last active August 29, 2015 14:21
Madison Tree Data and Map
<!doctype html>
<meta charset="UTF8">
<html>
<head>
<title>Madison Tree Types</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.2/d3.js" charset="utf-8"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
@acouch
acouch / acouch_nvd3-recline.js
Last active August 29, 2015 14:21
recline scope
This file has been truncated, but you can view the full file.
//////////////////////////////////////////////////////////////////////////
// //
// This is a generated file. You can view the original //
// source in your browser if your browser supports source maps. //
// //
// If you are using Chrome, open the Developer Tools and click the gear //
// icon in its lower right corner. In the General Settings panel, turn //
// on 'Enable source maps'. //
// //
// If you are using Firefox 23, go to `about:config` and set the //
@acouch
acouch / president.csv
Last active August 10, 2016 10:28 — forked from dwillis/president.csv
OpenElections Results Spec Version 2
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 14 columns, instead of 7 in line 8.
election_id,division,office_name,office_district,given_name,additional_name,family_name,suffix_name,other_names,party,winner,write-in,votes,pct
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Barack,,Obama,,Barack Obama,DEM,TRUE,,1218709,59.19
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Mitt,,Romney,,Mitt Romney,REP,,,792564,38.49
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Gary,,Johnson,,Gary Johnson,LIB,,,25303,1.23
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Jill,,Stein,,Jill Stein,GRN,,,13817,0.67
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Tiffany,Renee,Briscoe,,Tiffany Renee Briscoe,DEM,,TRUE,13,0
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Dennis,,Knill,,Dennis Knill,DEM,,TRUE,2,0
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Matthew,,Lydick,,Matthew Lydick,REP,,TRUE,17,0
md-2012-11-06-general,ocd-division/country:us/state:md,President,,Barbara,A.,Prokopich
api = 2
core = 7.x
includes[core] = drupal-org-core.make
; Profile
projects[dkan][type] = profile
projects[dkan][download][type] = git
projects[dkan][download][url] = https://github.com/NuCivic/dkan.git
projects[dkan][download][branch] = 7.x-1.11-RC2