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
| single_quote = "'" | |
| script = ' | |
| first = "single_quote = \"#{single_quote}\"" | |
| assignment = "script = " + single_quote | |
| lines = [ | |
| first, | |
| assignment, | |
| script.strip, |
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
| "Emergency": | |
| "Disaster Response": | |
| "Emergency Cash": | |
| "Help Pay for Food": | |
| "Help Pay for Healthcare": | |
| "Help Pay for Housing": | |
| "Help Pay for Gas": | |
| "Help Pay for School": | |
| "Help Pay for Utilities": | |
| "Emergency Food": |
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
| require 'capybara/poltergeist' | |
| require 'ruby-progressbar' | |
| session = Capybara::Session.new(:poltergeist) | |
| session.visit("https://bank.simple.com/signin") | |
| session.fill_in("username", with: "USERNAME") | |
| session.fill_in("password", with: "PASSWORD") | |
| session.click_on("Sign in") |
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 PlantBucketAssignment | |
| belongs_to :plant | |
| belongs_to :bucket | |
| end | |
| class Bucket | |
| has_many :plant_bucket_assignments | |
| has_many :plants, through: :plant_bucket_assignments | |
| def current_plant |
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
| Administrate.actions(:rake_tasks) do |page| | |
| page.rake :clear_cache | |
| 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
| require 'dnsimple' | |
| def update_dns | |
| # TODO: Put DNSimple username and API Key or password in ~/.dnsimple | |
| # See https://github.com/aetrion/dnsimple-ruby/blob/master/README.md#credentials | |
| DNSimple::Client.load_credentials_if_necessary | |
| # TODO replace with domain and record name | |
| record = find_record 'example.com', 'www' |
NewerOlder