Skip to content

Instantly share code, notes, and snippets.

View YusefOuda's full-sized avatar

Yusef Ouda YusefOuda

  • Austin, TX
  • 03:56 (UTC -06:00)
View GitHub Profile
@YusefOuda
YusefOuda / Privacy Policy.md
Last active August 23, 2020 19:16
Can I Buy It? for YNAB - Privacy Policy
@YusefOuda
YusefOuda / presents.rb
Created September 15, 2014 14:25
Presents
class Presents
def self.guess_gifts(wishlist, presents)
guess = []
presents.each do |present|
wishlist.each do |wish|
if (wish.values - present.values).size == 1
guess.push(wish[:name])
end
end
end
@YusefOuda
YusefOuda / darts.rb
Last active August 29, 2015 14:06
Throwing darts
class Darts
def self.score_throws(arr)
sum = 0
flag = true
arr.each do |dart|
if dart < 5
sum += 10
elsif dart <= 10
sum += 5