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
# frozen_string_literal: true | |
module Tictactoe | |
# Player records the symbol being used | |
class Player | |
attr_reader :symbol | |
def initialize(symbol) | |
@symbol = symbol | |
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
#!/bin/bash | |
# Search for directories with name 'functional-tests' in current directory | |
for directory in $(find . -type d -name 'functional-tests'); do | |
# Check if a Gemfile exists in the directory | |
if [ -e "$directory/Gemfile" ]; then | |
# Output which directory is being checked | |
echo -e "\033[0;34mChecking gems in directory:\033[0m $directory" | |
# Change into the directory and run the bundler outdated command |
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/bash | |
# Warning | |
# This assumes you already have copied your schematics to /share/schematics | |
# Also, we delete the original schematics folder in each instance, so back up everything you want to keep | |
multimc_instances_dir="$HOME/.local/share/multimc/instances" | |
shared_schematics_dir="$HOME/.local/share/schematics" | |
# Iterate over each instance folder |
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/bash | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <executable_name>" | |
exit 1 | |
fi | |
executable="$1" | |
IFS=':' read -ra path_dirs <<< "$PATH" |
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 CustomerScenario | |
def initialize(scenario) | |
@scenario = scenario | |
end | |
end | |
ParameterType( | |
name: 'customer_scenario', | |
regexp: /passed|failed|banned/, |
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
# frozen_string_literal: true | |
require 'capybara' | |
require 'capybara/dsl' | |
require 'selenium/webdriver' | |
Capybara.register_driver :firefox do |app| | |
Capybara::Selenium::Driver.new(app, browser: :firefox) | |
end | |
Capybara.default_driver = :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
# frozen_string_literal: true | |
# Robot name | |
# When robots come off the factory floor, they have no name. | |
# | |
# The first time you boot them up, a random name is generated in the format of two uppercase letters followed by three digits, such as RX837 or BC811. | |
# | |
# Every once in a while we need to reset a robot to its factory settings, which means that their name gets wiped. The next time you ask, it will respond with a new random name. | |
# | |
# The names must be random: they should not follow a predictable sequence. |
OlderNewer