This now exists in the google-apps-shared-contacts-api-spike repo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: | |
Then /^the "([^\"]*)" checkbox should be checked$/ do |label| | |
field_labeled(label).should be_checked | |
end | |
Then /^the "([^\"]*)" checkbox should not be checked$/ do |label| | |
field_labeled(label).should_not be_checked | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder | |
use strict; | |
use warnings; | |
use URI::Escape qw(uri_escape_utf8); | |
use open IO => ":utf8", # UTF8 by default | |
":std"; # Apply to STDIN/STDOUT/STDERR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are the steps I took to get the HSBC Bookmarklet (http://dies-el.co.uk/hsbc_bookmarklet) installed. | |
1. Get a copy of John Gruber's perl script to create bookmarklets (I've copied it and created a gist) | |
$ git clone git://gist.github.com/316867.git make-bookmarklet | |
2. Get a copy of Andrew Donaldson's HSBC auto logger inner | |
$ git clone git://gist.github.com/266260.git hsbc-bookmarklet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've moved this to its own repository - http://github.com/chrisroos/mysql-export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'rspec' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Introduction | |
# ------------ | |
# I wanted a fairly simple/standalone way to check whether our rails apps were affected by the ActionMailer/SMTP error | |
# in lighthouse ticket 2340 - https://rails.lighthouseapp.com/projects/8994/tickets/2340 | |
# Usage | |
# ----- | |
# Use the script/runner within your rails app | |
# $ script/runner lighthouse-ticket-2340-rails-smtp-error-check.rb | |
# Remember to run it in the relevant environment, e.g. production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FlashHelper | |
# If message contains symbol like strings we'll inject the value from that helper method | |
# e.g. 'foo :bar baz' will return 'foo <return value of the bar method> baz' | |
def render_flash_message(message) | |
h(message).gsub(/:(flash_\w+)/) { send $1 } | |
end | |
def flash_helper_method | |
'*you called a_helper_method*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTTPStreamHandler will use httpclient if installed (which it will be if you've installed soap4r as a gem, as httpclient is listed as a dependency) and fall back to net/http if it's not. We want to force net/http so that we can use FakeWeb. This hack is pretty crappy because it relies on the implementation of Soap4r but it works so is good enough for now. | |
def force_soap4r_to_use_net_http! | |
require 'soap/netHttpClient' | |
SOAP::HTTPStreamHandler.send :remove_const, :Client | |
SOAP::HTTPStreamHandler.const_set(:Client, SOAP::NetHttpClient) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
calendar_url = ARGV.shift | |
unless calendar_url | |
puts "Usage: #{File.basename(__FILE__)} <calendar-url> [<download-directory>]" | |
exit 1 | |
end | |
download_directory = ARGV.shift |
OlderNewer