This file contains 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 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 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 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 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 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 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 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 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 |
This file contains 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
# Error Codes | |
# 1: No variable name specified | |
# 2: No value found for variable | |
# If wanna save name = 'value' (between quotes), use: postgresql_config 12 foo \'bar\' (escaped) | |
postgresql_config() { | |
VERSION=$1 | |
NAME=$2 | |
VALUE=$3 | |
MATCHED=0 |
NewerOlder