Skip to content

Instantly share code, notes, and snippets.

@arlimus
Last active December 24, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arlimus/6798798 to your computer and use it in GitHub Desktop.
Save arlimus/6798798 to your computer and use it in GitHub Desktop.
Find your favorite unicode character quickly, print them to console
# define the printer
def p_uni(range); r = Array(range); return if r.empty?; puts r[0..79].pack("U*").gsub(/\p{^Print}/,''); p_uni(r[80..-1]); end
# use it
p_uni(0x30..0x2e50)
# this will give you:
# 0123456789:;<=>?@ABCDEFGHIJKLMNO...
# ...
# ⸠⸡⸢⸣⸤⸥⸦⸧⸨⸩⸪⸫⸬⸭⸮
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment