This file contains hidden or 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 PathHelpers | |
| # Takes a URL path (with optional query string), and asserts that it matches the current URL. | |
| def i_should_be_on(path_with_query, options = {}) | |
| expected = URI.parse(path_with_query) | |
| current = URI.parse(current_url) | |
| current.path.should == expected.path | |
| unless options[:ignore_query] | |
| Rack::Utils.parse_query(current.query).should == Rack::Utils.parse_query(expected.query) | |
| end |
This file contains hidden or 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 SectionHelper | |
| def selector_of_section(section_name) | |
| case section_name | |
| when 'recent podcasts' | |
| [:css, 'ul.podcasts'] | |
| when /^the row containing "[\"]+"$/ | |
| [:xpath, "//*[.='#{$1}']/ancestor::tr"] | |
| else | |
| raise "Can't find mapping from \"#{section_name}\" to a section." | |
| end |
This file contains hidden or 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 FieldMatchers | |
| def i_should_see_field(name, options = {}) | |
| field = find_field(name) | |
| field.should_not be_nil | |
| case options[:type] | |
| when nil | |
| when 'textarea' | |
| field.tag_name.should == type | |
| else | |
| field.tag_name.should == 'input' |
This file contains hidden or 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
| body { | |
| background: #fff; | |
| color: #000; | |
| } | |
| #pulls { | |
| text-shadow: unset; | |
| color: #000; | |
| } |
This file contains hidden or 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/perl -w | |
| if( scalar @ARGV < 1) { | |
| die "Usage $0 config_file\n"; | |
| } | |
| my $channels_map_file = "$ENV{'HOME'}/.xmltv/supplement/tv_grab_uk_atlas/tv_grab_uk_atlas.map.channels.conf"; | |
| my %channels = (); | |
| unless(open CHANNELS, "< $channels_map_file") { | |
| print STDERR "Failed to open channels map - $channels_map_file : $!\n"; |
This file contains hidden or 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 | |
| require 'rubygems' | |
| require 'rexml/document' | |
| require 'mysql2' | |
| require 'date' | |
| HOME_CONFIG = "#{ENV['HOME']}/.mythtv/config.xml" | |
| ETC_CONFIG = "/etc/mythtv/config.xml" | |
| if File.exist?(HOME_CONFIG) |
This file contains hidden or 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 | |
| require 'open3' | |
| require 'time' | |
| EXIF_DATE_FORMAT='%Y:%m:%d %H:%M:%S' | |
| offset = ARGV[0].to_i | |
| file_name = ARGV[1] |
This file contains hidden or 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 | |
| # This script outputs a series of lines that can be added to the [ipv4] section | |
| # of a NetworkManager VPN config file (typically found in | |
| # /etc/NetworkManager/system-connections/) | |
| # | |
| # ./aws_vpn_routes.rb | sudo tee -a /etc/NetworkManager/system-connections/<connection_name> | |
| require 'net/http' | |
| require 'json' |
This file contains hidden or 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
| 2017/01/23 11:25:50 [INFO] Terraform version: 0.8.4 a791ff09b29d063dd4b6da0cac04ad3b83c836f5 | |
| 2017/01/23 11:25:50 [INFO] CLI args: []string{"/Users/alextomlins/tmp/tf_0.8.4/terraform", "apply"} | |
| 2017/01/23 11:25:50 [DEBUG] Detected home directory from env var: /Users/alextomlins | |
| 2017/01/23 11:25:50 [DEBUG] Detected home directory from env var: /Users/alextomlins | |
| 2017/01/23 11:25:50 [DEBUG] Attempting to open CLI config file: /Users/alextomlins/.terraformrc | |
| 2017/01/23 11:25:50 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
| 2017/01/23 11:25:50 [DEBUG] Detected home directory from env var: /Users/alextomlins | |
| 2017/01/23 11:25:50 [DEBUG] No diff, not a noop | |
| 2017/01/23 11:25:50 [TRACE] Graph after step *terraform.PruneNoopTransformer: |
This file contains hidden or 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
| 2017/02/06 11:46:07 [INFO] Terraform version: 0.8.5 b4d477660b5abd20f2a70175460c9603797fada0 | |
| 2017/02/06 11:46:07 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply", "."} | |
| 2017/02/06 11:46:07 [DEBUG] Detected home directory from env var: /Users/alextomlins | |
| 2017/02/06 11:46:07 [DEBUG] Discovered plugin: pingdom = /usr/local/bin/terraform-provider-pingdom | |
| 2017/02/06 11:46:07 [DEBUG] Detected home directory from env var: /Users/alextomlins | |
| 2017/02/06 11:46:07 [DEBUG] Attempting to open CLI config file: /Users/alextomlins/.terraformrc | |
| 2017/02/06 11:46:07 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
| 2017/02/06 11:46:07 [DEBUG] Detected home directory from env var: /Users/alextomlins | |
| 2017/02/06 11:46:07 [DEBUG] Checking resource noop: aws_iam_server_certificate.cert | |
| 2017/02/06 11:46:07 [DEBUG] No diff, not a noop |
OlderNewer