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 Word | |
def initialize(w = "foo", m = "bar") | |
@w = w | |
@m = m | |
end | |
def word | |
@w | |
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
## | |
# Hello hello! | |
# | |
# This is meant to be a quick (and fun?) sense-check of your Ruby! | |
# | |
# Notes: | |
# 1. Feel free to download the CSV locally paste into irb or run this with `ruby requests.rb`! | |
# 2. We're loosely available to field questions on [email protected] | |
# 3. Don't overanalyze your implementation/formatting/variable names/etc. do what comes naturally to you | |
# 4. More than anything, thanks for taking the time to work through this! -BN |
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
shader_type spatial; | |
render_mode specular_schlick_ggx, world_vertex_coords; | |
uniform sampler2D img : hint_albedo; | |
uniform vec4 base_color : hint_color; | |
uniform vec4 top_color : hint_color; | |
uniform vec4 right_color : hint_color; | |
uniform vec4 front_color : hint_color; | |
uniform float intensity : hint_range(0.0, 1.0) = 0.1; | |
varying vec3 true_normal; |
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 | |
def reverse(val = "") | |
val.split.reverse.join(" ") | |
end | |
# 2 | |
def first_missing(val = []) | |
return 1 if val.select {|x| x > 0}.empty? | |
return val.select {|x| x > 0}.inject(&:+) + 1 if val.select {|x| x > 0}.size == 1 | |
counter = val.uniq.select {|x| x > 0}.sort.min |
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
# Variable Switch | |
a, b = b, a | |
# Palindrome | |
def palindrome(value = "") | |
value.downcase == value.downcase.reverse | |
end | |
# Balanced Brackets | |
def b_brackets(value = "") |