Skip to content

Instantly share code, notes, and snippets.

@azanium
azanium / docker-compose-etcd.yml
Created February 2, 2023 13:03
docker-compose-etcd.yml
---
# Copyright 2018 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@azanium
azanium / docker-compose.mysql.yml
Last active February 2, 2023 13:07
docker-compose.mysql.yml
version: '3'
services:
db:
image: mysql:8.0
cap_add:
- SYS_NICE
restart: always
environment:
- MYSQL_DATABASE=db
- MYSQL_ROOT_PASSWORD=password
@azanium
azanium / docker-compose.redis.yml
Last active February 2, 2023 13:07
docker-compose.redis.yml
version: '3'
services:
cache:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
@azanium
azanium / ffmpegExplained.sh
Created March 11, 2023 14:48
FFMPEG Explained
ffmpeg -re \
# -re (input)
# Read input at native frame rate. Mainly used to simulate a grab device, or live input stream (e.g. when reading from a file). Should not be used with actual grab devices or live input streams (where it can cause packet loss). By default ffmpeg attempts to read the input(s) as fast as possible. This option will slow down the reading of the input(s) to the native frame rate of the input(s). It is useful for real-time output (e.g. live streaming).
# (!) Turns out this will interrupt the stream by the audio input, making the output stream fps looks extremely low
-pix_fmt uyuv442 \
-framerate 30 \
-f avfoundation \
# Pixel format & Framerate for FFMPEG-device: https://www.ffmpeg.org/ffmpeg-devices.html#avfoundation
-i "0" \
# Use input "0" from avfoundation
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDE7Lcesu1lC73hll8Vcy9yR1iJ2N7f1KBPsavFDO3/1Nssk9yXbLikXJqLvV0cgkXbqteb9kkGL8M5fAGpz7VdlwDR5lRvpzAxrJjb+WBXlNaA2WBwJhOEglMC9pVI1Wd5FKWC2axKY9z/UwXALAHH1+Be0COXqDzZBoeHDLIvQHjA9vCN3+1yI2A3xnKas+8E8bhCGG5amj5DgDwB55lRlRZVrMzUJchU7OfiV01KOBm9F6KK5SEFFVf8ecGE1Gb6XUixbL5ltRooxI5Glf8MNZgiSZr5TQ6z7XiceyOBJ98/VH6X9QAsnUeH/F+B0nBkGKqeDZWEUZ5rGnHASSTihz1rSDERTxfNKbJxjvxXxVm+0/CA13+SrbkfSoJ1NgXTrH1rLYgcLvMRHOWRYYLBVxwB4aq0cHO+9QOs5k1b73tBi+oMJIjqAY8K9mlfJEnuoNklTFX/SvogNxlTjwEXAfByQCI9OQv5O9GI9ATge7RqtQ1AwblZWkNHKXR84rfgMnRh2A65XuEoDOVXymXaMOtSZTXDhdvdFt8t3BBgd2VnRQrikcIrvCGTNeCpVlyDvjZaOjJORBxCzh9xME+bozKDdxN0JvGcLcjJQGJ6WYLzbDsWdB4qX81ACP40H1S/7TPvAVjErP5MnIQNdd91sUJbH88uDObycSmzmtgmcw== syuaibi@gmail.com