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
150
0
Share
Twemoji RubyGem
Introduce Twemoji RubyGem @ Asakusa.rb
19 May 2015
Juanito Fatas
May 19, 2015
More Decks by Juanito Fatas
See All by Juanito Fatas
Data Migration with Confidence
juanitofatas
3
960
My Open Source Journey
juanitofatas
1
3.3k
NSDanger
juanitofatas
1
190
How to build deppbot
juanitofatas
3
630
Introducing Danger
juanitofatas
0
360
Twemoji 3.0 in the making and announcement beyond SG50
juanitofatas
0
820
Continuous Updates
juanitofatas
0
160
Ruby Asia and dat bacon cannon
juanitofatas
1
280
Update Early, Update Often
juanitofatas
1
1.1k
Other Decks in Technology
See All in Technology
Cortex(Code) を ML モデルの 精度改善サイクルに組み込む.pdf
oimo23
0
260
論文紹介:Pixal3D (SIGGRAPH 2026)
tenten0727
0
670
Python開発環境にハーネス適用を検討する
yuuka51
0
270
【新卒研修】ライブデモ + compose.yaml読解_講義資料
dip_tech
PRO
0
120
Orchestration Development Workshopを半期実施して
lycorptech_jp
PRO
0
130
パーソルキャリア IT/テクノロジー職向け 会社紹介資料|Company Introduction Deck
techtekt
PRO
0
260
SDDで⾒える、AIコーディングの"内訳"
lycorptech_jp
PRO
0
150
AIのために、AIを使った、Effect-TSからの脱却 〜テストを活用した安全なリファクタリングの進め方〜
bitkey
PRO
1
210
GitHub Copilot CLI の Rubber Duck 機能を使ってコーディングの品質をあげよう #techbaton_findy
stefafafan
1
270
TSKaigi 2026 - Auth.jsからBetter Authへの 移行に見る「型とランタイム」の 設計思想の変化
teamlab
PRO
1
110
【禁断】Obsidianの第二の脳に「知の巨人」と呼ばれた師匠の脳をロードしてみた
nagatsu
0
2.6k
TSKaigi 2026 - enumよ、さようなら
teamlab
PRO
2
300
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
190
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
910
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
230
Everyday Curiosity
cassininazir
0
210
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
520
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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 磷涹