Skip to content

Instantly share code, notes, and snippets.

@Fraserbc
Fraserbc / debug.c
Created March 17, 2025 19:54
A way of getting debug output via openocd
#include <stdint.h>
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
volatile uint8_t dbg_tx_tail = 0;
volatile uint8_t dbg_tx_head = 0;
volatile uint8_t dbg_tx_buf[128] = {0};
volatile uint8_t dbg_rx_tail = 0;
@Fraserbc
Fraserbc / schema_to_ldif.sh
Created April 7, 2023 19:22
Convert from .schema to a .ldif useable with ldapadd
#!/bin/bash
schema_file=$1
if [[ -z $schema_file ]]; then
echo "$0 [Schema File]"
exit -1
fi
schema=$(basename "${schema_file%.*}")
module checksum(
i_clk,
i_da,
i_data,
o_da,
o_data
);
// Module Port Definitions
input wire i_clk;
@Fraserbc
Fraserbc / quizziz_micromatch.js
Created January 20, 2021 10:28
Quizziz Micromatch Cheat
var clickEvent = new MouseEvent('pointerdown', {
view: window,
bubbles: true,
cancelable: true
});
var tiles = Array.prototype.slice.call(document.getElementsByClassName("MatchModeQuestionGridBoard-tile"));
var lookup = {}
for(var i = 0; i < Quizlet.matchModeData.terms.length; i++) {