This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set up some logging. VERY useful to see why things aren't working. | |
logger_syslog=-1 | |
logger_syslog_level=2 | |
logger_stdout=-1 | |
logger_stdout_level=2 | |
# Which interface to use and which bridge to join | |
interface=wlan0 | |
bridge=br0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://stackoverflow.com/a/48368508/17132546 | |
// Entry template | |
// extract the lambda's operaor() function signature | |
template <class F, class T=F> | |
struct lambda_traits: lambda_traits<decltype(&std::remove_reference<F>::type::operator()), F> | |
{}; | |
// For mutable lambda, See https://en.cppreference.com/w/cpp/language/lambda | |
// mutable lambda's operator() is not const, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Parameter: | |
# LOG MODULE: folder name | |
# BIND_PORT: network sinker register port | |
# SEND_PORT: network sinker publish port | |
macro(enable_logging LOG_MODULE BIND_PORT SEND_PORT) | |
if(NOT spdlog_FOUND) | |
find_package(spdlog REQUIRED) | |
endif() | |
if(NOT Boost_FOUND) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
Language: Cpp | |
# BasedOnStyle: LLVM | |
AccessModifierOffset: -4 # -2 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlines: Right | |
AlignOperands: true | |
AlignTrailingComments: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global_config] | |
focus = system | |
title_transmit_bg_color = "#d30102" | |
suppress_multiple_term_dialog = True | |
[keybindings] | |
[profiles] | |
[[default]] | |
background_color = "#2D2D2D" | |
background_darkness = 0.85 | |
cursor_color = "#2D2D2D" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <errno.h> | |
#include <fcntl.h> | |
#include <linux/videodev2.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/ioctl.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
#include <opencv2/core/core.hpp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/archive/iterators/binary_from_base64.hpp> | |
#include <boost/archive/iterators/base64_from_binary.hpp> | |
#include <boost/archive/iterators/transform_width.hpp> | |
#include <utility> | |
#include <memory> | |
#include <string> | |
#include <vector> | |
std::string to_base64(const std::vector<uint8_t>& buffer) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
disk_use=`df -h / | head -2 | tail -1 | awk -F" " '{print $5}' | awk -F% '{print $1}'` | |
if [ $disk_use -gt 80 ] | |
then | |
# Delete log files older than 3 days | |
find /home/hokori/logs/ -mtime +3 -type d -exec rm -rf {} \; | |
else | |
# Delete log files older than 7 days |