This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: Add some basic validation around the absolute path required | |
# for `default_font_dir`. I just temp hardcoded the path before coz.. eh. | |
# Move the dir checking from the `producer` function as the pre-validation | |
# and path prep. | |
const default_font_dir = ARGS[1] | |
function producer(chnl::Channel) | |
for file in readdir(abspath(default_font_dir)) | |
font_pkg_name = basename(file) |> splitext |> first | |
put!(chnl, font_pkg_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_emails_from_string(string) | |
email_validation_regex = | |
Regexp.new(/([a-z0-9A-Z\+\_\.\'\!\#\$\%\&\~\{\}\|\-]+\@[a-z0-9A-Z\+\_\.\'\!\#\$\%\&\~\{\}\|\-]+)/i) | |
string.scan(email_validation_regex).flatten.join(', ') | |
end |