Skip to content

Instantly share code, notes, and snippets.

@Technerder
Technerder / Dockerfile
Last active August 24, 2022 22:00
Dockerized JMusicBot
FROM eclipse-temurin:17-alpine
RUN apk --no-cache add curl
WORKDIR /opt/apps/musicbot
RUN addgroup -S musicbot && adduser --no-create-home -S -G musicbot musicbot
RUN chown musicbot:musicbot .
USER musicbot:musicbot
RUN curl https://github.com/jagrosh/MusicBot/releases/download/0.3.8/JMusicBot-0.3.8.jar --output JMusicBot.jar --location
@Technerder
Technerder / barcode_detector.py
Created October 16, 2019 17:51
Simple barcode detection using cv2 and pyzbar
from cv2 import VideoCapture, waitKey
from pyzbar import pyzbar
camera = VideoCapture(0)
while not (waitKey(1) & 0xFF == ord('q')) and camera is None or camera.isOpened():
for barcode in pyzbar.decode(camera.read()[1]):
print(barcode.data.decode('UTF-8'))
camera.release()