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 "logger" | |
| require "watir" | |
| require "faker" | |
| Watir.default_timeout = 10 | |
| class ILoungeVoting | |
| VOTING_URL = "https://itangolounge.com/vote" | |
| CONTESTANT = "Tuý Hoa" |
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 ApplePayController < ApplicationController | |
| layout "marketing_signup" | |
| def show | |
| respond_to do |format| | |
| format.html { render :text => Foobar.foo } | |
| end | |
| 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
| 1. Get URL of backup db | |
| > heroku pg:credentials:url <database_name> -a kajabi-storefronts-production | tail -1 | |
| 2. Get URL of live db | |
| > heroku pg:credentials:url <database_name> -a kajabi-storefronts-production | tail -1 | |
| 3. Open both db with your local psql client to see if your data is being ported to the live db |
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
| university = Site.find(ENV["UNIVERSITY_SITE_ID"]) | |
| members = university.members | |
| count = 0 | |
| member_emails = [] | |
| emails_as_eui_count = 0 | |
| # find emails as external user ids | |
| members.find_each do |member| | |
| eui = member.external_user_id |
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
| def float_to_percentage_or_dash(float, options={}) | |
| float = float.to_f | |
| nan = options.delete(:nan) || "—".html_safe | |
| options[:precision] ||= 0 | |
| return nan if float.nan? | |
| float == 0 ? dash : number_to_percentage(float * 100, **options) | |
| end | |
| def percentage_or_dash(value) |