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
Initializing modules... | |
- module.cluster | |
Initializing provider plugins... | |
The following providers do not have any version constraints in configuration, | |
so the latest version was installed. | |
To prevent automatic upgrades to new major versions that may contain breaking | |
changes, it is recommended to add version = "..." constraints to the |
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
describe "Bulk tagging" do | |
def verify_count(options) | |
options.each do |key,count| | |
expect(find("#results-#{key}")).to have_content count | |
end | |
end | |
def create_tag(tag, on:) | |
visit '/ip_taggings/create_many' | |
fill_in 'ips_and_fqdns', with: Array(on) |
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 'benchmark' | |
require 'csv' | |
file = ARGV.first | |
Benchmark.bm 40, 'total' do |x| | |
t1 = x.report "csv parse" do | |
CSV.parse(File.open(file), headers: true) do |row| | |
# get the 'pr' row |
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
<form action="floodsmart.com/some/special/page" method="POST"> | |
<!-- setup some redirects --> | |
<input type="hidden" name="error_redirect" value="http://waterfall/agent/1/unknown_error.html"> | |
<input type="hidden" name="success_redirect" value="http://waterfall/agent/1/thankyou.html"> | |
<!-- note the agents site --> | |
<input type="hidden" name="agent_id" value="something_unique"> | |
<!-- actual form inputs go here --> | |
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
# put this in /lib/autoload | |
# Make sure /config/application.rb has a line `config.autoload_paths` which has /lib/autoload in it | |
module Gattica | |
class Engine | |
def do_http_get(query_string) | |
# fixes 1.9 compatibility with http | |
response = @http.get(query_string, @headers) | |
data = response.body |
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
unless ENV['HEROKU'] | |
group :development, :test do | |
gem 'private gem', :git => git@github.com:private/repo | |
end | |
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
Scenario: Has no parents | |
Given the following categories exist: | |
| name | | |
| Foo | | |
| Bar | | |
| Baz | | |
Scenario: Nested tree | |
Given the following categories exist: | |
| name | parent | |
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
class RegistrationsController < Devise::RegistrationsController | |
layout false | |
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
$ sudo apt-get install firefox |
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 Foo | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def bar | |
end | |
end |
NewerOlder