This file contains 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
# consuming sodium in cmake is a needlessly difficult task. | |
include(ExternalProject) | |
set(SODIUM_VERSION 1.0.19) | |
ExternalProject_Add( | |
sodium | |
URL https://download.libsodium.org/libsodium/releases/libsodium-${SODIUM_VERSION}.tar.gz | |
PREFIX ${CMAKE_BINARY_DIR}/_deps/sodium # this is to avoid having a system install | |
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> ./configure --prefix=<INSTALL_DIR> |
This file contains 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
/** | |
* @file object_manager.h | |
* @brief Defines the ObjectManager class template for managing objects with activation and deactivation capabilities. | |
* @author Abdul Rahman Dabbour | |
* @license MIT | |
*/ | |
#ifndef OBJECT_MANAGER_H | |
#define OBJECT_MANAGER_H |
This file contains 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
/* | |
Copyright 2023 Abdul Rahman Dabbour | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains 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 | |
# A simple logging 'library' for bash scripts. | |
# | |
# There are three basic things to set: | |
# - Minimum log level [default: info] (debug < info < warn < error < critical) | |
# - Node name [default: unidentified] | |
# - Log path [default: $HOME/.local/log/$LOGGER_NODE_NAME.log] | |
# | |
# Example usage: |
This file contains 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
#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
### | |
# git-recursive | |
# | |
# This script will execute a given command recursively on every git repository | |
# found under the current directory. | |
# | |
# Copyright 2022 Abdul Rahman Dabbour |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
struct cpu_data_t { | |
int user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice; | |
}; | |
// based on answer here: https://stackoverflow.com/a/23376195/8295404 |
This file contains 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
#!/usr/bin/env python3 | |
from pathlib import Path | |
from argparse import ArgumentParser | |
if __name__ == "__main__": | |
PARSER = ArgumentParser() | |
PARSER.add_argument( | |
"--install_manifest", | |
"-m", |
This file contains 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
## C++ | |
# ---------------------------------------------------------------------------- | |
# Prerequisites | |
*.d | |
# Compiled Object files | |
*.slo | |
*.lo | |
*.o | |
*.obj |
This file contains 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
FROM ros:melodic | |
ENV NVIDIA_VISIBLE_DEVICES \ | |
${NVIDIA_VISIBLE_DEVICES:-all} | |
ENV NVIDIA_DRIVER_CAPABILITIES \ | |
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics | |
# Add essential tools | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
apt-transport-https \ |
This file contains 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
BasedOnStyle: Google | |
ColumnLimit: 120 | |
MaxEmptyLinesToKeep: 1 | |
SortIncludes: true | |
Standard: Auto | |
IndentWidth: 2 | |
TabWidth: 2 | |
UseTab: Never | |
AccessModifierOffset: -2 |
NewerOlder