Skip to content

Instantly share code, notes, and snippets.

View adamgoucher's full-sized avatar

adam goucher adamgoucher

View GitHub Profile
adamgoucher / radgridhackiness.cs
Created June 3, 2014 14:51
radgrid hackiness
protected void RGsummary_ItemDataBound(object sender, GridItemEventArgs e)
if (e.Item is GridPagerItem)
//setting the page sizes
RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
BLL.RadGridFunctions.PopulatePageSizeCombo(PageSizeCombo, RGsummary.MasterTableView.ClientID);
PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
class role::sms_gateway_development {
include profile::laravel3
class {'profile::sms_gateway':
application_environment => 'development'
class role::sms_gateway_testing {
include profile::laravel3
class {'profile::sms_gateway':
adamgoucher / gist:aade0b8719149cbfcf22
Created May 8, 2015 23:54
JQueryDatePicker helper class for webedriver
from selenium import webdriver
class NoSuchDayException(Exception):
""" Custom exception for trying to select an invalid day of the month
Rather than try and be clever around which days are valid in a month, we trust that
the widget is populating things correctly and just blow up if you request the 4th day
of the month for instance.
adamgoucher / .etc.default.puppet
Created July 31, 2015 01:53
So puppet lets you assign agents to 'environments', but that is done at the agent level. But of course you cannot manage the agent config until it has connected to the server to gets its node config blah blah blah catch 22. so i'm going to modify /etc/default/puppet to look like this in my custom ami in order to be able to pass in the environmen…
# Defaults for puppet - sourced by /etc/init.d/puppet
# Enable puppet agent service?
# Setting this to "yes" allows the puppet agent service to run.
# Setting this to "no" keeps the puppet agent service from running.
for x in $(facter ec2_userdata); do
case $x in
adamgoucher /
Created August 4, 2015 23:22
quick scripts to deploy and then wait for completion of a build in aws codedeploy.
if [ -f ]; then
aws deploy create-deployment \
--application-name MY_APPLICATION \
--deployment-group-name humans \
--s3-location bucket=MY_BUCKET,bundleType=zip,key=MY_APPLICATION\/$ \
--output text \
--region us-west-2 >
adamgoucher / codemash-selenium-precompiler.txt
Created January 10, 2011 02:06
work-in-progress agenda for codemash selenium precompiler
adamgoucher / tags.rb
Created February 5, 2011 19:11
example of how to use tags with rspec. more importantly, how to use multiple tags
# see
describe "rabbit holes" do
# single tags - can be either but not both
# rspec --tag depth:shallow tags.rb
# rspec --tag depth:deep tags.rb
# multiple tags
adamgoucher / Continuous Delivery Workshop.txt
Created February 14, 2011 19:58
The working 'agenda' for my STPCon workshop on Continuous Delivery
So this is what I have got myself into:
An important trend in software development is the idea of continuous delivery and the deployment pipeline. It is possible to have a deployment pipeline that is a series of manual steps, but that is neither efficient to execute or fun to build. Automation plays a large role in addressing both of these problems. This workshop looks at each stage of a typical pipeline and illustrates the role of automation and it’s goals. Appropriate for developers, testers, operations or anyone who wants to speed up their release time, participants will leave with implementable automation ideas and strategies.
The current version of the agenda is:
- Introduction to Continuous Delivery
- Managing the Machines (Puppet)
adamgoucher / rspec-syntax-cheat-sheet.rb
Created February 18, 2011 18:56 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2.0 syntax Cheet Sheet with tunings for Selenium
# RSpec 2.0 syntax Cheet Sheet by
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
adamgoucher / loggingdocumentationformatter.txt
Created February 24, 2011 04:46
how to hack in log messages to rspec 2
When doing automation I coach people not to put in logging in their scripts aside from things like 'here is the user name and password I randomly created just now' but I couldn't coax the default documentation formatter in rspec to capture information send via 'puts'. So I over-engineered a solution. Proper documentation and inclusion in my rspec-selenium-pageobjects project in a day or so.
module RSpec
module Core
class Reporter
def with(message)
notify :with, message