Skip to content

Instantly share code, notes, and snippets.

View aleksas's full-sized avatar

Aleksas Pielikis aleksas

View GitHub Profile
@aleksas
aleksas / README.md
Created August 24, 2024 21:38
Media Streaming Setup with Docker and GStreamer

Media Streaming Setup with Docker and GStreamer

This gist contains files to set up a media streaming server using Docker, GStreamer, and a looping script. The configuration allows you to stream media files using the Real-Time Streaming Protocol (RTSP). The goal is to stream two synchronized videos packed into an MKV container.

Files in this Gist

1. docker-compose.yml

This Docker Compose file sets up two services:

@aleksas
aleksas / README.md
Created August 21, 2024 07:32
Fun SAM2 workspaces

EVF SAM-2

Huggingface Space EVF-SAM: Early Vision-Language Fusion for Text-Prompted Segment Anything Model

EVF-SAM extends SAM-2's capabilities with text-prompted segmentation, achieving high accuracy in Referring Expression Segmentation.

docker run -it -p 7860:7860 --platform=linux/amd64 --gpus all registry.hf.space/wondervictor-evf-sam2:latest python app.py
#! /usr/bin/python
# wakeonlan.py
#
# Wake on LAN
#
# Use:
# wol computer1
# wol computer1 computer2
# wol 00:11:22:33:44:55
@aleksas
aleksas / README.md
Last active March 13, 2024 01:25
Command `DYMO LabelMaster 280` from python on Ubuntu

Script copied from original dymoprint page and modified to include LM280 usb device id 0x1005 and ttf paths changed. Also usb device class changed from 0x3 to 0x7.

  • Install drivers from this repo by following these instructions.
  • Check if Ubuntu detects the LM 280 when connected to computer and powered on.
  • Run the script.
@aleksas
aleksas / CMakeLists.txt
Last active May 16, 2024 13:43
cv::Mat shared memory serializer deserializer into lockfree ring buffer
cmake_minimum_required(VERSION 3.0.0)
project(circular-buffer-queue VERSION 0.1.0)
set(Boost_USE_MULTITHREADED OFF)
add_definitions(-DBOOST_ALL_NO_LIB)
find_package( Boost 1.54 COMPONENTS system thread REQUIRED )
find_package( OpenCV REQUIRED )
include_directories(
${Boost_INCLUDE_DIRS}
cmake_minimum_required(VERSION 3.0.0)
project(circular-buffer-queue VERSION 0.1.0)
set(Boost_USE_MULTITHREADED OFF)
add_definitions(-DBOOST_ALL_NO_LIB)
find_package( Boost 1.54 COMPONENTS system thread REQUIRED )
find_package( OpenCV REQUIRED )
include_directories(
${Boost_INCLUDE_DIRS}
@aleksas
aleksas / CMakeLists.txt
Last active November 12, 2020 22:30 — forked from sehe/Makefile
Boost shared memory lockfree circular buffer queue
cmake_minimum_required(VERSION 3.0.0)
project(circular-buffer-queue VERSION 0.1.0)
set(Boost_USE_MULTITHREADED OFF)
add_definitions(-DBOOST_ALL_NO_LIB)
find_package( Boost 1.54 COMPONENTS system thread REQUIRED )
include_directories(${Boost_INCLUDE_DIRS})
set(LINK_LIBRARIES
@aleksas
aleksas / README.md
Last active November 24, 2023 12:59
Analog-to-digital conversion and acquisition (Arduino DUE + Python)

Analog-to-digital conversion and acquisition (Arduino DUE + Python)

Copied and translated from original published by Frédéric Legrand (archived copy).

1. Introduction

This page shows how to operate the analog-to-digital converter of the Arduino Due, in order to perform sampled acquisitions. The sampling will be done by interrupts triggered by a stopwatch. The samples will be transmitted in a continuous stream to the computer, in order to be plotted in a graphics window or to undergo various treatments.

The arduino code presented can be used as a basis for an on-board application dealing with audio signals.

@aleksas
aleksas / arduino-due_high-speed-ADC.ino
Last active March 12, 2021 09:40 — forked from pklaus/arduino-due_high-speed-ADC.ino
Arduino Due: ADC → DMA → USB @ 1MSPS
#undef HID_ENABLED
// Arduino Due ADC->DMA->USB 1MSPS
// by stimmer
// from http://forum.arduino.cc/index.php?topic=137635.msg1136315#msg1136315
// Input: Analog in A0
// Output: Raw stream of uint16_t in range 0-4095 on Native USB Serial/ACM
// on linux, to stop the OS cooking your data:
// stty -F /dev/ttyACM0 raw -iexten -echo -echoe -echok -echoctl -echoke -onlcr
@aleksas
aleksas / README.md
Last active May 13, 2022 19:59
Raspberry 3B+ | HiFi Berry DAC+ Pro | FluidSynth | MIDI keyboard

DRAFT guide for DIY synth: Alesis V61 + Rapberry 3B+ + HiFi Berry DAC+ Pro

Probably 99% compatible with most synths

Setup fluidsynth

sudo apt-get update -y
sudo apt-get install -y fluidsynth