Skip to content

Instantly share code, notes, and snippets.

View richard-hajek's full-sized avatar

Richard Hajek richard-hajek

View GitHub Profile
@hiorws
hiorws / face-detection.py
Created May 12, 2020 16:43 — forked from bookjan/face-detection.py
Using python opencv to detect face and send the frames to FFmpeg to create HLS(HTTP Live Streaming)
import numpy as np
import cv2
import sys
cap = cv2.VideoCapture(0)
face_cascade = cv2.CascadeClassifier('<PATH_TO_CASCADES_FOLDER>/haarcascade_frontalface_default.xml')
while(True):
# Capture frame-by-frame
@miblodelcarpio
miblodelcarpio / notes_weechat
Last active November 7, 2025 22:20
WeeChat Relay Setup
weechat (v4.0.0+)
Relevant Release Note: https://weechat.org/files/doc/weechat/ReleaseNotes-4.0.0.html#v4.0.0_tls
Relay setup
On the server's instance of weechat:
/relay add tls.irc 8001
/secure set relay WHATEVER_PASSWORD
/set relay.network.password "${sec.data.relay}"
@mosquito
mosquito / README.md
Last active April 10, 2026 19:09
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active June 10, 2026 04:11
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@endolith
endolith / readme.md
Last active December 27, 2025 21:24
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf