Skip to content

Instantly share code, notes, and snippets.

@dragonlock2
dragonlock2 / resume.sty
Created September 21, 2020 08:24
My LaTeX resume template
% Original template by Abhinay Korukonda
% Heavily modified by Matthew Tran
%%% PACKAGES
% Used for scaling
\usepackage{relsize}
% Font
\usepackage{tgpagella}
% Microtyping, apparently makes things look better
@dragonlock2
dragonlock2 / WLPROM.cpp
Last active January 8, 2021 01:20
Simple EEPROM wear leveling algorithm
#include "WLPROM.h"
namespace WLPROM {
void read(WLData* dat) {
EEPROM::readBites(findData(), (char*) dat, sizeof(WLData));
}
void write(WLData* dat) {
uint16_t next_addr = findData() + sizeof(WLData);
@dragonlock2
dragonlock2 / EEPROM.cpp
Created January 8, 2021 01:19
Code to interact with BRCF016GWZ
#include "EEPROM.h"
extern I2C i2c;
namespace EEPROM {
void resetEEPROM() {
char buff[MAX_BLOCK_WRITE];
for (uint16_t i = 0; i < MAX_BLOCK_WRITE; i++) {
buff[i] = 0xFF;