Skip to content

Instantly share code, notes, and snippets.

View gerardogc2378's full-sized avatar

Gerardo Gonzalez gerardogc2378

View GitHub Profile
class Word
def initialize(w = "foo", m = "bar")
@w = w
@m = m
end
def word
@w
end
##
# 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 recruiting+fullstack@trychameleon.com
# 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
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;
@gerardogc2378
gerardogc2378 / ooyala-second-test.rb
Created April 12, 2017 23:25
Ooyala Second Test
# 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
# Variable Switch
a, b = b, a
# Palindrome
def palindrome(value = "")
value.downcase == value.downcase.reverse
end
# Balanced Brackets
def b_brackets(value = "")