Skip to content

Instantly share code, notes, and snippets.

@jordanhudgens
Created May 27, 2021 00:11
Show Gist options
  • Save jordanhudgens/bf79e40681cc1bf4447dd5ebec588508 to your computer and use it in GitHub Desktop.
Save jordanhudgens/bf79e40681cc1bf4447dd5ebec588508 to your computer and use it in GitHub Desktop.
require "socket"
require "escpos"
port = 9100
printer = Escpos::Printer.new
printer << "Testing from #{port}"
ip = "68.0.171.246"
socket = TCPSocket.new ip, port
socket.write printer.to_escpos
socket.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment