Skip to content

Instantly share code, notes, and snippets.

View Noffica's full-sized avatar

NaumanM Noffica

  • Vancouver, Canada
View GitHub Profile
@Noffica
Noffica / blank.rb
Last active August 29, 2015 14:23
File I/O
#
require 'active_support/all'
@candidates = [
{
id: 5,
years_of_experience: 4,
github_points: 293,
languages: ['C', 'Ruby', 'Python', 'Clojure'],
date_applied: 5.days.ago.to_date,
age: 26
@Noffica
Noffica / max.rb
Last active August 29, 2015 14:23 — forked from davidvandusen/max.rb
# # Find the maximum
# def maximum(arr)
# arr.max
# end
# # expect it to return 42 below
# result = maximum([2, 42, 22, 02])
# puts "max of 2, 42, 22, 02 is: #{result}"
# # expect it to return nil when empty array is passed in
@Noffica
Noffica / Interactive Ruby (Practise)
Created June 23, 2015 18:36
Lighthouse Labs - Week 1 - Day 2
vagrant [Day-2]> pry
[1] pry(main)> def say_hi
[1] pry(main)* name = gets.chomp
[1] pry(main)* puts "Hi, #{name}."
[1] pry(main)* end
=> :say_hi
[2] pry(main)> say_hi
Matthews
Hi, Matthews.
=> nil