Skip to content

Instantly share code, notes, and snippets.

View lucasnegrao's full-sized avatar

Lucas Negrão lucasnegrao

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]) {
// Calculate the required buffer size
size_t command_size = strlen("ffmpeg.exe") + 1;
for (int i = 1; i < argc; i++) {
command_size += strlen(argv[i]) + 3; // For space, quotes, and null terminator
}
@lucasnegrao
lucasnegrao / create_videos.sh
Last active September 23, 2024 05:33
Using FFMPEG to concat videos
#!/bin/bash
# Check if directory is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 /path/to/video/files"
exit 1
fi
# Set desired output resolution and frame rate
output_width=1280
@lucasnegrao
lucasnegrao / zha-zigbee-rotary-smart-knob-remote-control.yaml
Last active October 3, 2022 21:26 — forked from blizzrdof77/zha-moes-zigbee-rotary-smart-knob-remote-control.yaml
ZHA - Tuya Smart Knob (TS004F) controller for remote control devices
blueprint:
name: ZHA - Moes Smart Knob for lights
description: 'Control lights with a Moes Smart Knob.
You can set functions for a single press. This allows you to assign,
e.g., a scene or anything else.
Rotating left/right will change the brightness smoothly of the selected light.
Not all functionality of the device is available at time of writing, e.g. double press, long press and press and rotate.'