Skip to content
Proyectos

aschmelyun/print-my-profile-pic

Ver en GitHub

Acerca de

¡Di patata! Marca este repositorio con una estrella y tu foto de perfil se imprimirá en una impresora de recibos.

Otros proyectos

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
+3
in 7 days
+20
in 15 days
+26
in 1 month
+113

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

print-my-profile-pic

Star this repo to have your GitHub profile picture framed, printed out on my receipt printer, and stuck to my wall.

That's it!

[!TIP] If you give a one-time sponsorship of any amount beforehand, your profile picture will be printed in a special frame.

Holding up a photo of me printed on a receiptPinning a receipt to a board called the Hall of Frame

How's it work?

GitHub allows you to create webhooks for specific events on your repos, I've set one up for starring this project.

When that happens, a payload is POSTed to a Cloudflare tunnel domain, which leads to a PHP script running on a Raspberry Pi that's sitting on my desk.

From the inbound request, you can gleen info about the person who starred the repo, like their display name and avatar URL. The script takes their profile picture, renders it behind a cut-out of a photo frame, and then adds some other info I thought should be included in each receipt.

The RPi is connected to an Epson TM-T88IV thermal receipt printer via USB, and the PHP script uses my go-to escpos-php library to format the receipt data and send it off to the printer.

But why?

It sounded fun when my friend Sam mentioned it. That's pretty much it!

What now?

I'll periodically update this README with a picture of the pinboard I've dubbed the "Hall of Frame" as pictures get added to it.

Want to add a new frame? Send in a PR!

Explorar proyectos relacionados

Cargando…