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
| # Input | |
| consumer_klass_name = "YourAwesomeConsumer" | |
| offset = 0 | |
| # Runnnnnnnn | |
| consumer_klass = consumer_klass_name.constantize | |
| config_file = "config/racecar.rb" | |
| require Rails.root.join(config_file) | |
| Racecar.config.group_id_prefix | |
| Racecar.config.load_consumer_class(consumer_klass) |
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
| #!/bin/sh | |
| # sh -c "$(curl -fsSL https://gist.githubusercontent.com/fernandes/9a538fe1d61366f31c4e6f035db1a3e9/raw/eba511687f56f19d94a79d6922c3a45cac0484fc/set_terminal_colors.sh)" | |
| color00="37/38/31" # Base 00 - Black | |
| color01="E4/62/66" # Base 08 - Red | |
| color02="AE/D7/B6" # Base 0B - Green | |
| color03="F9/AB/77" # Base 0A - Yellow | |
| color04="4D/8A/CB" # Base 0D - Blue | |
| color05="7E/7E/DD" # Base 0E - Magenta | |
| color06="93/DD/FB" # Base 0C - Cyan |
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
| include: | |
| - "lib/**/*.rb" | |
| - "app/**/*.rb" | |
| - definitions.rb | |
| exclude: | |
| - spec/**/* | |
| - test/**/* | |
| - vendor/**/* | |
| - ".bundle/**/*" | |
| - fixtures/**/* |
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 "test_helper" | |
| class Splasher | |
| attr_reader :total, :range, :per, :mod, :unit, :unit_total, :start_at | |
| def initialize(total:, range:, unit: :hour, per: :hour, start_at: DateTime.now) | |
| @total = total | |
| @range = range | |
| @unit = unit | |
| @per = per |
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
| # shard.yml | |
| # dependencies: | |
| # openssl_ext: | |
| # github: spider-gazelle/openssl_ext | |
| # version: ~> 2.0 | |
| require "openssl" | |
| require "openssl_ext" | |
| ciphertext = "-----BEGIN CERTIFICATE----- | |
| MIIBiQYJKoZIhvcNAQcDoIIBejCCAXYCAQAxggEhMIIBHQIBAD |
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 sign_out | |
| visit ThatPageYouWant | |
| hover_el = el("@your-hover-element") | |
| # Calculate where we should move the mouse to on the page | |
| # here we are using the x coordinate + half of the width of the element to be hovered | |
| # and the same logic for the y position | |
| hover_el_rect = hover_el.rect |
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 "active_record" | |
| require "sqlite3" | |
| ActiveRecord::Base.establish_connection( | |
| :adapter => 'sqlite3', | |
| :host => "localhost", | |
| :database => ':memory:' | |
| ) | |
| ActiveRecord::Schema.define do |
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
| FROM crystallang/crystal:0.34.0-alpine-build AS build-env | |
| ARG LUCKY_ROOT=/app | |
| ARG DEV_PACKAGES="nodejs yarn" | |
| ENV LUCKY_ENV=production | |
| ENV NODE_ENV=production | |
| WORKDIR $LUCKY_ROOT | |
| # install packages | |
| RUN apk update \ |
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
| crystal: 0.34.0 | |
| dependencies: | |
| lucky: | |
| github: luckyframework/lucky | |
| version: ~> 0.21 | |
| shrine: | |
| github: jetrockets/shrine.cr | |
| version: ~> 0.8 |
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 'test_helper' | |
| # Add the `described_class` so it can be used in the AutoInterfaceTest | |
| class ActiveSupport::TestCase | |
| def described_class | |
| self.class.to_s.gsub(/Test$/, '').constantize | |
| end | |
| end | |
| # In the interface, the example Auto - Car is dummy, because it should be |
NewerOlder