Skip to content

Instantly share code, notes, and snippets.

View Nkemjiks's full-sized avatar
🏠
Working from home

Mbonu Blessing Nkemjiks

🏠
Working from home
  • Execonline
  • Nigeria
View GitHub Profile
require "HTTParty"
require 'nokogiri'
module Instructions
def introductions
puts 'Welcome to dev.to webscraper. This CLi tool gathered articles based on the hashtag provided'
puts 'If you want to quit, simple type (q) the next time you are prompted to enter a value'
puts 'Please provide a hashtag to continue..'
puts ''
end
@Nkemjiks
Nkemjiks / first_non_repeating_letter.rb
Last active October 5, 2020 08:55
Codewars solutions
def first_non_repeating_letter(s)
return '' if s.strip == ''
non_rep_l = s.chars.uniq { |s| [s.downcase, s.upcase] }.select { |ss| s.downcase.count(ss.downcase) == 1 }.first
non_rep_l.nil? ? '' : non_rep_l
end