Skip to content

Instantly share code, notes, and snippets.

@jcwilk
Last active December 28, 2015 09:09
Show Gist options
  • Save jcwilk/7477216 to your computer and use it in GitHub Desktop.
Save jcwilk/7477216 to your computer and use it in GitHub Desktop.
#To run this script, either copy and paste this whole thing into a console, or simply the following:
=begin
require 'rest-client'
eval(RestClient.get('https://gist.github.com/jcwilk/7477216/raw/1562c7a4bbcf7002f3402715da95826c095f103e/random_emoji.rb'))
=end
require 'nokogiri'
require 'rest-client'
emojis = Nokogiri.parse(RestClient.get('http://www.emoji-cheat-sheet.com/')).css('span.name')
emoji = ':'+emojis[(emojis.count*rand).to_i]+':'
puts emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment