You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Mike DemonDad
mikeybob
Retired Silicon Valley software developer & engineer. Devops Director and pioneer. Survivor of internet bubbles 1, 2, And 3.
write code using node.js that implements all of the esc/pos language to print a receipt including a logo, a list of items with prices, a tag line and a barcode
Chat GPT
Here's an example code using Node.js that implements ESC/POS language to print a receipt:
Find out the values you need to know to connect a thermal printer via USB from a python script.
Find EP-Ids and Device ID of Thermal Printer by name
When using the Python Library python-escpos to use a thermal printer via usb, you need the device id, vendor id, endpoint out id, and endpoint in id.
Finding these values took me some time, so here is a script that automates the process.
All you need to supply to the script is the name of the printer device. Find it out by running lsusb with the printer disconnected. Then connect the printer and run lsusb again.
Look out for the device that has been added and remember its name (or some part of it, doesn't really matter).
Run ./get_thermal_printer_info.sh "device name" and there you'll find the values you need to create the escpos.printer.Usb object.
NB: This document describles a 'Old-School' way of using Yubikey with SSH
Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.
Pros of FIDO
Simpler stack / less moving parts
Works directly with ssh, ssh-add and ssh-keygen on most computers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A work in progress collection of proprietary and as of yet undocumented HomeKit characteristics and their UUIDs used by Elgato Eve.
This list is not including all Eve accessories available and some services and characteristics still make no sense to me. If you have anything to contribute, please leave a comment. There is no guarantee that the information listed below is correct.