Skip to content

Instantly share code, notes, and snippets.

View edance's full-sized avatar

Evan Dancer edance

View GitHub Profile
@edance
edance / emoji.rb
Created May 31, 2017 15:54
Encode and decode emoji unicode characters
module Emoji
# Emojis found from link below
# https://raw.githubusercontent.com/omnidan/node-emoji/master/lib/emoji.json
SYMBOL_LOOKUP = JSON.parse(File.read("#{Rails.root}/emoji.json"))
STRING_LOOKUP = SYMBOL_LOOKUP.invert
ALL_REGEXP = Regexp.union(STRING_LOOKUP.keys)
def find(symbol)
SYMBOL_LOOKUP[symbol.to_s]
end
@edance
edance / example.mbtiles
Last active August 29, 2015 14:04
Geography MBTiles
This file has been truncated, but you can view the full file.