Skip to content

Instantly share code, notes, and snippets.

View eparadis's full-sized avatar
💭
getting things done

Ed Paradis eparadis

💭
getting things done
View GitHub Profile
import collections
import math
import os
import cv2
import numpy as np
import time
MAX_LINES = 4000
N_PINS = 36*8
MIN_LOOP = 20 # To avoid getting stuck in a loop
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active April 19, 2024 16:34
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@geerlingguy
geerlingguy / pi-cpu-stress.sh
Last active June 12, 2024 21:51
Raspberry Pi CPU temperature and throttling test script
#!/bin/bash
# Raspberry Pi stress CPU temperature measurement script.
#
# Download this script (e.g. with wget) and give it execute permissions (chmod +x).
# Then run it with ./pi-cpu-stress.sh
#
# NOTE: In recent years, I've switched to using s-tui. See:
# https://github.com/amanusk/s-tui?tab=readme-ov-file#options
# Variables.
@scally
scally / please_dont_use_di.js
Last active April 25, 2020 00:49
Please don't use dependency injection frameworks in modern Typescript/Javascript
/*
If you are using dependency injection in Typescript/Javascript under the pretense that
you are doing anything other than overengineering and making your life and your team's life
harder, please read this.
*/
// The code below doesn't care what `logger` is, only that it exports `log`!
// This creates a test seam / interface behind which you can replace it with ANYTHING!
// You only care that the thing being exported has a `log` function!
import { log } from './logger'
@mtvee
mtvee / punyforth.cpp
Last active July 26, 2020 15:37
A puny forth in c++ for no good reason
/*
* PunyForth
*
* Copyright 2020(c) mtvee
* All rights reserved.
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
@luzhuomi
luzhuomi / pocketchip_debian10.md
Last active April 16, 2024 13:05
A tutorial to upgrade NXT pocket C.H.I.P to Debian Buster

Pocket Chip Debian 10 Upgrade Guide

The purpose of this tutorial is to walk through the required steps to upgrade NXT chip (or pocketchip) from debian jessie to debian buster.

If you would like to start your Chip from scratch, follow the steps in the Preparation section.

Preparation (Optional)

A linux host machine, recommended Ubuntu 18.04. However I managed to do it with 20.10 with some tweak.

@ScienceElectronicsFun
ScienceElectronicsFun / Mod_LaMeresCPU_WebFPGA.v
Created September 12, 2021 16:02
Verilog CPU for WebFPGA
// @MAP_IO port_out_00[0] 06
// @MAP_IO port_out_00[1] 07
// @MAP_IO port_out_00[2] 08
// @MAP_IO port_out_00[3] 09
// @MAP_IO port_out_00[4] 10
// @MAP_IO port_out_00[5] 11
// @MAP_IO port_out_00[6] 12
// @MAP_IO port_out_00[7] 14
// @MAP_IO reset 18
@eparadis
eparadis / meeting_countdown.sh
Created October 18, 2021 19:23
a script that writes to a text file that you can use in OBS for an on-screen meeting timer
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo "Usage: ./meeting_countdown.sh NUM_MINS"
exit 1
fi
MINS=$1
OUTFILE=~/src/obs/timer_out.txt
MESSAGE="time remaining in this meeting: "