Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Twemoji RubyGem
Search
Juanito Fatas
May 19, 2015
Technology
0
140
Twemoji RubyGem
Introduce Twemoji RubyGem @ Asakusa.rb
19 May 2015
Juanito Fatas
May 19, 2015
Tweet
Share
More Decks by Juanito Fatas
See All by Juanito Fatas
Data Migration with Confidence
juanitofatas
3
940
My Open Source Journey
juanitofatas
1
3.2k
NSDanger
juanitofatas
1
180
How to build deppbot
juanitofatas
3
610
Introducing Danger
juanitofatas
0
350
Twemoji 3.0 in the making and announcement beyond SG50
juanitofatas
0
780
Continuous Updates
juanitofatas
0
150
Ruby Asia and dat bacon cannon
juanitofatas
1
270
Update Early, Update Often
juanitofatas
1
1.1k
Other Decks in Technology
See All in Technology
2025-12-27 Claude CodeでPRレビュー対応を効率化する@機械学習社会実装勉強会第54回
nakamasato
4
1.4k
あの夜、私たちは「人間」に戻った。 ── 災害ユートピア、贈与、そしてアジャイルの再構築 / 20260108 Hiromitsu Akiba
shift_evolve
PRO
0
620
手軽に作れる電卓を作って イベントソーシングに親しもう CQRS+ESカンファレンス2026
akinoriakatsuka
0
230
AWSと生成AIで学ぶ!実行計画の読み解き方とSQLチューニングの実践
yakumo
2
460
CQRS/ESになぜアクターモデルが必要なのか
j5ik2o
0
950
AIと融ける人間の冒険
pujisi
0
120
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
1
110
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
1
810
「アウトプット脳からユーザー価値脳へ」がそんなに簡単にできたら苦労しない #RSGT2026
aki_iinuma
11
5.1k
ソフトとハード両方いけるデータ人材の育て方
waiwai2111
0
160
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
21k
ECS_EKS以外の選択肢_ROSA入門_.pdf
masakiokuda
1
130
Featured
See All Featured
Leo the Paperboy
mayatellez
3
1.3k
Being A Developer After 40
akosma
91
590k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
78
Exploring anti-patterns in Rails
aemeredith
2
220
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
130
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
430
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
41
Making Projects Easy
brettharned
120
6.5k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
200
Building AI with AI
inesmontani
PRO
1
620
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
200
Transcript
6YGOQLK
,WCPKVQ(CVCU !
@JuanitoFatas
@JuanitoFatas
@JuanitoFatas
@JuanitoFatas
Jolly Good Code !winstonyw
None
闦闇闕阒陎阇阸閥陆
6YKVVGT'OQLK
JVVRUVYGOQLKOCZEFPEQO
None
None
JVVRUIKVJWDEQOLQNN[IQQFEQFGVYGOQLK
6YGOQLKRCTUGňJGCTVAG[GUʼn 6YGOQLKRCTUG KOI ENCUUŅGOQLK FTCIICDNGŅHCNUG VKVNGŅJGCTVAG[GU CNVŅ
UTEŅJVVRUVYGOQLKOCZEFPEQOZHFRPI
20)ZZZ https://twemoji.maxcdn.com/72x72/1f60d.png https://twemoji.maxcdn.com/36x36/1f60d.png https://twemoji.maxcdn.com/16x16/1f60d.png
58)
6YGOQLKRCTUGQRVKQPU Twemoji.configure do |config| config.asset_root = "https://twemoji.awesomecdn.com/" config.file_ext = ".svg"
config.image_size = nil # only png need to set size config.class_name = "twemoji" config.img_attr = "style='height: 1.3em;'" end
#XCKNCDNGCU4CKNU*GNRGT module EmojiHelper def emojify(content, **options) return if content.blank? Twemoji.parse(h(content),
options).html_safe end end
'4DXKGY <%= emojify "I like chocolate :heart_eyes:!”, image_size: "36x36" %>
$WVYGNKMG*CON %= emojify "I like chocolate :heart_eyes:!", image_size: "36x36"
1T*CONYKVJQWV UNKO = emojify "I like chocolate :heart_eyes:!", image_size:
"36x36" 5QTT[/CVUWFC閽闻
*6/.2KRGNKPG JVVRUIKVJWDEQOLEJJVONRKRGNKPG
%QPVGPV =/CTMFQYP(KNVGT? /CTMFQYP
%JCKPQH(KNVGTU
None
⬅️⬅️⬅️
+PVGTITCVGYKVJ*6/.2KRGNKPG module HTML class Pipeline module Twitter class EmojiFilter <
HTML::Pipeline::Filter def call Twemoji.parse(doc) end end end end end
+PVGTITCVGYKVJ*6/.2KRGNKPG module MarkdownHelper def markdown_to_html(post, **options) pipeline = HTML::Pipeline.new [
HTML::Pipeline::SanitizationFilter, HTML::Pipeline::Twitter::EmojiFilter, HTML::Pipeline::RougeFilter, ], { gfm: true, mentions: post.mentions, post: post, **options } pipeline.call(post.body)[:output].to_s.html_safe end end
/C[6JG6YGOQLK $G9KVJ[QW
閼㖼㉦閬闇闈閵 閪闲閴闐閮閼閾閬闦闁猳
#UCMWUCTD 磷涹