Skip to content

Instantly share code, notes, and snippets.

View dvigne's full-sized avatar

Derick Vigne dvigne

View GitHub Profile
@dvigne
dvigne / CMakeLists.txt
Created March 24, 2021 20:47
Download Submodules Quietly Using CMake. Referenced From https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html
# Initialize Git Submodules if not already done on clone
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
# Update submodules as needed
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
@dvigne
dvigne / mavlink.cpp
Created March 16, 2021 19:08
Basic Serialization and Deserialization with Mavlink 2.0
@dvigne
dvigne / CMake: Variable Dump
Created March 15, 2021 18:49 — forked from drautb/CMake: Variable Dump
This snippet will dump all CMake variables to the build output
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
@dvigne
dvigne / selina.css
Last active March 9, 2021 03:10
CSS for One365
main article section:last-child {
width: 100% !important;
overflow-x: hidden;
}
main article section:last-child .content-wrapper {
padding: 0px !important;
margin: 0px !important;
width: 100%;
max-width: unset;
@dvigne
dvigne / selina.js
Last active February 3, 2021 04:19
$(document).ready(function(){
// start edit
var new_html_string = '';
var i;
var blog_post = '';
var items = new Array();
var item = new Object();
$('.summary-item-list:not(:first)').each(function() {
@dvigne
dvigne / get.sh
Created June 7, 2020 00:40
Custom Teleconsole Install for Sam
#!/bin/sh
#
# This is a simple CLi-based installer. Usually it's used from the website as:
#
# curl https://www.teleconsole.com/get.sh | sh
#
#
FORMAT="tar.gz"
TARBALL="teleconsole-$$.$FORMAT"
HOST=teleconsole.com
@dvigne
dvigne / prometheus.conf
Created May 14, 2020 15:42
Prometheus Supervisorctl Configuration With Logfile Redirection
[program:prometheus]
process_name=%(program_name)s_%(process_num)02d
command=/root/prometheus/prometheus --config.file=/root/prometheus/prometheus.yml --web.listen-address="127.0.0.1:9090"
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/root/prometheus/logs/error.log
@dvigne
dvigne / syslog
Created May 12, 2020 14:34
Ubuntu 19.10 Eoan Syslog output on OpenVPN Direct Connection for Streisand Issue Board
May 12 10:31:53 derick-asus kernel: [ 3606.125743] audit: type=1400 audit(1589293913.532:69656): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=8933 comm="Discord" requested_mask="read" denied_mask="read" peer="snap.slack.slack"
May 12 10:31:53 derick-asus kernel: [ 3606.125810] audit: type=1400 audit(1589293913.532:69657): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=8933 comm="Discord" requested_mask="read" denied_mask="read" peer="snap.slack.slack"
May 12 10:31:53 derick-asus kernel: [ 3606.125879] audit: type=1400 audit(1589293913.532:69658): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=8933 comm="Discord" requested_mask="read" denied_mask="read" peer="snap.slack.slack"
May 12 10:31:53 derick-asus kernel: [ 3606.125956] audit: type=1400 audit(1589293913.532:69659): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=8933 comm="Discord" requested_mask="read" denied_mask="read" peer="unconfined"
May 12 10:31:5
@dvigne
dvigne / prepare-commit-msg.sh
Created April 14, 2020 07:08 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@dvigne
dvigne / Vagrantfile
Created July 8, 2019 22:47
Artificial Intelligence CLIPS Ubuntu Vagrant Box and Provisioning Script
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at