Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Jacobs ttocsneb

View GitHub Profile
@ttocsneb
ttocsneb / debug.h
Last active Jan 31, 2018
include debug.h to c++ projects using std::cout to enable macro debugging, enable debugging by defining DEBUG
View debug.h
#ifndef __DEBUG_H__
#define __DEBUG_H__
/**
This Debug Header is used improve debugging.
@see https://github.com/ttocsneb/cs235resources
@code
#define DEBUG
@ttocsneb
ttocsneb / main.json
Last active Jun 13, 2019
A test config for a bot
View main.json
{
"lookups": {
"test": {
"desc": "a basic 5e stats test",
"uri": "https://gist.githubusercontent.com/ttocsneb/b253ebd2028067f3ada8a27c2e71ead7/raw/a59a33c8d8cebfb8095ae379a5a2bc45f244aaaf/test.json"
}
}
}
@ttocsneb
ttocsneb / color.ino
Last active Feb 16, 2020
Moon Light software. This is for my father's birthday present: a light up moon, read more on my blog https://blog.benscraft.info/one-shots/the-moon-project/
View color.ino
#include <stdlib.h>
Color::Color(uint8_t r, uint8_t g, uint8_t b) {
this->r = r;
this->g = g;
this->b = b;
}
uint32_t Color::to32() {
return ((uint32_t)r << 16) | ((uint32_t)g << 8) | b;
You can’t perform that action at this time.