Skip to content

Instantly share code, notes, and snippets.

View Jacob-Tate's full-sized avatar

Jacob Jacob-Tate

  • Kirkland, WA
View GitHub Profile
#-------------------------------------------------------------------------------
# author Jacob Ivan Tate
# date 10/17/2019
#
cmake_minimum_required (VERSION 3.14)
#------------------------------------------------------------------------------
# Project setup, versioning stuff here, change when changing the version
# Note: keep the project name lower case only for easy linux packaging support
@Jacob-Tate
Jacob-Tate / snippet.cpp
Created December 4, 2019 06:21
Include the correct std::filesystem
//
// https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros
//
#include <vector>
#if defined(__cpp_lib_filesystem)
#include <filesystem>
#else
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <experimental/filesystem>
@Jacob-Tate
Jacob-Tate / snippet.cpp
Created December 4, 2019 06:18
Get EXE Location C++
//Returns the absolute path of the executable
std::filesystem::path file_manip::abs_exe_path()
{
#if defined(_MSC_VER)
wchar_t path[FILENAME_MAX] = { 0 };
GetModuleFileNameW(nullptr, path, FILENAME_MAX);
return std::filesystem::path(path);
#else
char path[FILENAME_MAX];
ssize_t count = readlink("/proc/self/exe", path, FILENAME_MAX);
/**
* @file arclite_getopt.cpp
* @author Jacob I. Tate
* @brief Simple getopt style command line parser with short and long options
*/
#include "arclite_getopt.hpp"
#include <cstdio> // vsnprintf
#include <cstdarg> // va_list
#include <cstring>
/*!
* @file crtp_allocation.cpp
* @brief Overriding the new and delete operators globally
* @author Jacob I. Tate
* @version 0.0.1
* @date 2019
*/
#include <cstdlib>
#include <malloc.h>
/*!
* @file crtp_type_name.hpp
* @brief
* @author Jacob I. Tate
* @version 0.0.1
* @date 2019
*/
#include <string>
#include <cstdlib>
/*!
* @file crtp_singleton.hpp
* @brief Singleton base class
* @author Jacob I. Tate
* @version 0.0.1
* @date 2019
*/
#pragma once
@Jacob-Tate
Jacob-Tate / main.cpp
Last active December 4, 2019 05:30
Task scheduler
/*!
* @file main.cpp
* @brief Task based scheduler demo
* @author Jacob I. Tate
* @version 0.0.1
* @date 2019
*/
#include "scheduler.hpp"
#include <iostream>
# Enable some colorization
```sh
git config --global color.ui auto
```
# Set the name attached to commits and tags
```sh
git config --global user.name "nightslashs"
```
# Set the email address attached to commits and tags
```sh
git config --global user.email "[email protected]"
```