Skip to content

Instantly share code, notes, and snippets.

View GaussianWonder's full-sized avatar
🗿

Teodor GaussianWonder

🗿
View GitHub Profile
@GaussianWonder
GaussianWonder / CMakeLists.txt
Created January 20, 2022 01:37
Macro to auto include all directories that contain headers. Useful when no naming conflicts exist. Benefit of not specifying relative paths to your own headers. This can easily be integrated with conan
# Search all directories that contain headers
macro(HEADER_DIRECTORIES return_list)
file(GLOB_RECURSE new_list *.h)
set(dir_list "")
foreach(file_path ${new_list})
get_filename_component(dir_path ${file_path} PATH)
set(dir_list ${dir_list} ${dir_path})
endforeach()
list(REMOVE_DUPLICATES dir_list)
set(${return_list} ${dir_list})
@GaussianWonder
GaussianWonder / code.desktop
Last active January 17, 2022 09:27
OpenFolder and OpenFile(s) context menu options for kde's file manager DOLPHIN
[Desktop Entry]
Type=Service
Icon=com.visualstudio.code
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=text/plain;
Actions=openFilesInVSCode;
Encoding=UTF-8
X-KDE-AuthorizeAction=shell_access
[Desktop Action openFilesInVSCode]
@GaussianWonder
GaussianWonder / split_real_time_rtsp.sh
Created December 21, 2021 21:47
Script to convert real time RTSP input into multiple files. FFMPEG needed. Useful for IP cameras
#!/bin/bash
print_help () {
echo "-h|--host HOST"
echo "-p|--port PORT"
echo "--path PATH"
echo "-U|--user USER"
echo "-P|--password PASSWORD"
echo "t|--time SPLIT INTERVAL"
echo " 00:00:10 (10 seconds)"