Skip to content

Instantly share code, notes, and snippets.

View RPiAwesomeness's full-sized avatar

Nate Olander RPiAwesomeness

View GitHub Profile
@RPiAwesomeness
RPiAwesomeness / CMakeLists.txt
Last active June 25, 2019 13:59
It's gone all pear shaped...
cmake_minimum_required(VERSION 3.13)
project(foo VERSION 0.0.1)
set(source_files
${CMAKE_SOURCE_DIR}/src/foo.cpp
${CMAKE_SOURCE_DIR}/src/bar.cpp
)
set(header_files
${CMAKE_SOURCE_DIR}/include/foo.hpp
@RPiAwesomeness
RPiAwesomeness / md5.cpp
Created April 11, 2019 00:41
MD5 Implementation in C++
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
#define MD5_INPUT_LENGTH 64
// Unsigned character - 8 bits
typedef unsigned char uchar_8;

Keybase proof

I hereby claim:

  • I am rpiawesomeness on github.
  • I am rpiawesomeness (https://keybase.io/rpiawesomeness) on keybase.
  • I have a public key ASB4wn6Qb7AFGuIXDW8fdZ-QXZIPPHmR06wNBN7GdtQwAQo

To claim this, I am signing this object:

pub fn lex_stuff() -> Vec<String>;
@RPiAwesomeness
RPiAwesomeness / music.cpp
Last active April 7, 2018 20:45
Code contest
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main() {
int numCases, val;
string foo, in;
getline(cin, in);
{
"$schema":"http://json-schema.org/draft-07/schema",
"description": "The base schema for all the individual endpoints, used to provide reference",
"$id": "file:///home/RPiAwesomeness/go/src/github.com/CactusDev/Xerophi/base.json",
"type": "object",
"definitions": {
"messagePacket": {
"required": [ "data", "text", "type" ],
"properties": {
"data": { "type": "string" },
@RPiAwesomeness
RPiAwesomeness / sepal.go
Created May 24, 2017 16:21
Ask Ubuntu thingy-doodler
var config Config
var rdbConn rethink.Connection
func init() {
// TODO - implement launch flags
// totallyStupidAndUselessLoadingMessages()
// Load the config from config.json
config, err := LoadConfig()
if err != nil {
@RPiAwesomeness
RPiAwesomeness / stream_start.py
Created November 9, 2016 02:33
A quick bit of Python I run when I'm starting my streams - plays music and writes a countdown timer to a file, which OBS then reads and displays
import subprocess
import time
try:
subprocess.Popen(["cvlc", "/home/nate/Music/Approaching Nirvana/Lapse in Time/01 Bangers & Smashed.m4a"])
i = 0
while i < 294:
with open("/home/nate/countdown", 'w') as f:
@RPiAwesomeness
RPiAwesomeness / parse.py
Created September 30, 2016 14:33
Message parser
async def parse_message(self):
"""
Parses the message provided during initialization & converts data into
CB format.
"""
TEXT = {"type": "text", "text": ""}
EMOTES = {
"general": {
"type": "emote",
"service": "general",
package model
// User struct defines the fields for api2go to send
type User struct {
ID string `json:"-"`
Confirmed string `json:"confirmedAt"`
Active bool `json:"active"`
Email string `json:"email"`
Roles []string `json:"roles"`
Channels interface{} `json:"channels"`