Skip to content

Instantly share code, notes, and snippets.

View patcon's full-sized avatar

Patrick Connolly patcon

View GitHub Profile
@patcon
patcon / .travis.yml
Created September 16, 2012 16:56
Working test setup (without Strainer)
language: ruby
notifications:
email: false
rvm:
- 1.9.3 # Same as Ariadne host env
install: bundle install --without default
script:
- bundle exec foodcritic cookbooks-*/* -I test/support/foodcritic/* -t '~CINK001' -t '~FC011' -t '~FC031' --epic-fail ''
- mkdir cookbooks
- bundle exec knife cookbook test $(ls -m cookbooks-override | tr -d ',') $(ls -m cookbooks-projects | tr -d ',') --config=test/support/knife.rb
@patcon
patcon / .travis.yml
Created September 16, 2012 17:01
Proposed Strainer implementation
// ... Unchanged
script:
- mkdir cookbooks
- bundle exec strain $(ls -m cookbooks-override | tr -d ',') $(ls -m cookbooks-projects | tr -d ',')
@patcon
patcon / google-hangout.coffee
Created October 15, 2012 02:18 — forked from bcardarella/google-hangout.coffee
Hubot script for Google hangouts
# hangout <room name> provides a link to the proper GoogleHangout
module.exports = (robot) ->
robot.respond /(hangout|standup)\s?(.*)?/i, (msg) ->
roomname = msg.match[2] || msg.match[1]
link = "https://talkgadget.google.com/hangouts/extras/dockyard.com/"+roomname+"?authuser=0&hl=en&eid"
msg.send("Join " + roomname)
msg.send(link)
@patcon
patcon / Description.md
Created November 1, 2012 17:54
Using sox CLI tool to gather metrics on ambient volume in room

Running this on OSX, so need to install sox first:

brew install sox

Then paste this file somewhere, and run it in the background with:

bash monitor-audio-levels.sh

As of right now, it only add a character to /tmp/threshold-tally.txt for every 5-second interval where volume exceeds the arbitrary "3" threshold. Would be really useful to timestamp each, and convert to JSON that we can send to a custom leftronic.com dashboard widget, and get a rough idea of how much of the day a room's volume exceeds a given threshold.

@patcon
patcon / gist:4588103
Last active December 11, 2015 10:38
Quick tutorial for booting a new Rackspace server with OpenStack's Nova client (CLI).
  1. Install easy_install python package manager [Ref]:

     sh setuptools-0.6c9-py2.4.egg --prefix=~
    
  2. Install Rackspace CLI based on OpenStack Nova:

     easy_install rackspace-novaclient
    
  3. Export envvars (or in .bash_profile if you'd like) [Ref]:

@patcon
patcon / Capfile
Last active December 12, 2015 06:28
Explanation of how to deploy drupal sites to vagrant VM (Ariadne specifically)
require 'drush_deploy'
module UseScpForDeployment
def self.included(base)
base.send(:alias_method, :old_upload, :upload)
base.send(:alias_method, :upload, :new_upload)
end
def new_upload(from, to, options = {})
old_upload(from, to, options.merge!(:via => :scp))
#!/bin/bash
# Setup and start Sauce Connect for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# SAUCE_USERNAME
# SAUCE_ACCESS_KEY
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
#
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
#!/bin/sh
VERSION=0.8.18
PLATFORM=linux
ARCH=x86
PREFIX="$HOME/node"
mkdir -p "$PREFIX" && \
curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
| tar xzvf - --strip-components=1 -C "$PREFIX"
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2012 M. Alsup
* Version: 2.9999.81 (15-JAN-2013)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.7.1 or later
*/
;(function($, undefined) {
#!/bin/bash
# Setup and start Sauce Connect for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# SAUCE_USERNAME
# SAUCE_ACCESS_KEY
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
#
# Curl and run this script as part of your .travis.yml before_script section:
# before_script: