Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions shows/822 - Receipt Printer with JavaScript .md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
number: 822
title: Receipt Printer with JavaScript
date: 1726484400000
url: https://traffic.libsyn.com/syntax/Syntax_-_822.mp3
youtube_url: https://www.youtube.com/watch?v=tqZjSY-8N1E
---

Wes unveils his Hack-Week project —a thermal printer controlled by JavaScript that prints out Sentry.io errors in real-time. Scott and Wes dive into the nitty-gritty of how it works, from the ESC/POS protocol to tackling socket issues, and whether the project was worth the effort.

### Show Notes

* **[00:00](#t=00:00)** Welcome to Syntax!
* **[00:38](#t=00:38)** Brought to you by [Sentry.io](https://sentry.io/syntax).
* **[01:10](#t=01:10)** What is Hack Week?
* **[01:41](#t=01:41)** The project.
* [Follow the posts on X](https://twitter.com/wesbos/status/1827029875204489290).
* **[02:40](#t=02:40)** Why a receipt printer?
* **[03:55](#t=03:55)** How do these printers work?
* [ESC/POS](https://github.com/escpos).
* **[05:20](#t=05:20)** Communicating with the printer.
* **[07:24](#t=07:24)** ESC/POS Encoder.
* [ESC/POS Encoder](https://github.com/NielsLeenheer/EscPosEncoder).
* **[08:42](#t=08:42)** Socket issues.
* **[09:56](#t=09:56)** Using Transformers.js to stop 'toxic comments'.
* [Xenova's toxic-bert](https://huggingface.co/Xenova/toxic-bert).
* [Implementation in Wes' code](https://github.com/wesbos/thermal-printer/blob/main/lib/sfw.ts).
* **[10:48](#t=10:48)** Back to socket issues.
* **[12:18](#t=12:18)** Integrating with Sentry.
* **[15:01](#t=15:01)** Printing images with Playwright.
* **[16:17](#t=16:17)** Was it worth it?

### Hit us up on Socials!

Syntax: [X](https://twitter.com/syntaxfm) [Instagram](https://www.instagram.com/syntax_fm/) [Tiktok](https://www.tiktok.com/@syntaxfm) [LinkedIn](https://www.linkedin.com/company/96077407/admin/feed/posts/) [Threads](https://www.threads.net/@syntax_fm)

Wes: [X](https://twitter.com/wesbos) [Instagram](https://www.instagram.com/wesbos/) [Tiktok](https://www.tiktok.com/@wesbos) [LinkedIn](https://www.linkedin.com/in/wesbos/) [Threads](https://www.threads.net/@wesbos)

Scott: [X](https://twitter.com/stolinski) [Instagram](https://www.instagram.com/stolinski/) [Tiktok](https://www.tiktok.com/@stolinski) [LinkedIn](https://www.linkedin.com/in/stolinski/) [Threads](https://www.threads.net/@stolinski)

Randy: [X](https://twitter.com/randyrektor) [Instagram](https://www.instagram.com/randyrektor/) [YouTube](https://www.youtube.com/@randyrektor) [Threads](https://www.threads.net/@randyrektor)
Loading