$30 off During Our Annual Pro Sale. View Details »
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
930
My Open Source Journey
juanitofatas
1
3.2k
NSDanger
juanitofatas
1
180
How to build deppbot
juanitofatas
3
600
Introducing Danger
juanitofatas
0
350
Twemoji 3.0 in the making and announcement beyond SG50
juanitofatas
0
770
Continuous Updates
juanitofatas
0
140
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
Amazon Quick Suite で始める手軽な AI エージェント
shimy
1
1k
障害対応訓練、その前に
coconala_engineer
0
140
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
1.4k
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
340
Lookerで実現するセキュアな外部データ提供
zozotech
PRO
0
180
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
15
1.6k
AWS re:Invent 2025 re:Cap LT大会 データベース好きが語る re:Invent 2025 データベースアップデート/セッションの紹介
coldairflow
0
120
半年で、AIゼロ知識から AI中心開発組織の変革担当に至るまで
rfdnxbro
0
100
日本Rubyの会: これまでとこれから
snoozer05
PRO
4
200
ウェルネス SaaS × AI、1,000万ユーザーを支える 業界特化 AI プロダクト開発への道のり
hacomono
PRO
0
270
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
270
Kiro を用いたペアプロのススメ
taikis
3
950
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
140
We Have a Design System, Now What?
morganepeng
54
7.9k
A better future with KSS
kneath
240
18k
Context Engineering - Making Every Token Count
addyosmani
9
540
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
64
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Marketing to machines
jonoalderson
1
4.3k
Exploring anti-patterns in Rails
aemeredith
2
200
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
120
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
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 磷涹