Skip to content

Instantly share code, notes, and snippets.

@QuentinN42
QuentinN42 / ocr
Created September 19, 2021 08:12
Automatic ocr with tesseract & flameshot
#!/usr/bin/env bash
TMPDIR=$(mktemp -d -t ocr-XXXXXXXXXX)
trap "rm -rf $TMPDIR" EXIT
cd "$TMPDIR"
flameshot gui -r > img.png
tesseract img.png text
cat text.txt | xsel --clipboard --input
@mdo
mdo / 00-intro.md
Last active November 15, 2024 14:13
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

@elialbert
elialbert / avro_receiver1.py
Created April 19, 2012 14:42
python avro message receiver and parser
logging.info("INCOMING XCOM MESSAGE: %s"%message)
logging.info("INCOMING XCOM HEADERS: %s"%str(request.META))
logging.info("INCOMING XCOM REQUEST: %s"%request.POST.copy().__dict__)
logging.info("INCOMING XCOM REQUEST params: %s"%request.POST.copy())
authorization = request.META.get('HTTP_AUTHORIZATION')
if authorization != settings.XCOM_RECEIVER_FABRIC_CREDENTIALS:
return HttpResponse("Incorrect authorization!",status=403)
params = dict(request.POST.copy())