Skip to content

Instantly share code, notes, and snippets.

View kevinhikaruevans's full-sized avatar

Kevin Evans kevinhikaruevans

View GitHub Profile
@kevinhikaruevans
kevinhikaruevans / README.md
Last active April 22, 2024 16:15
Wait for one, cancel other `asyncio` tasks

Wait for one, cancel others

This is a little helper script that can be used to wait for a single asyncio task to finish, then cancel other waiting tasks.

Usage

My use-case for this is:

  • waiting on user input
  • ...while waiting on cancellation events input (via pub-sub)
@kevinhikaruevans
kevinhikaruevans / Readme.md
Created June 29, 2023 16:00
10-bit serial on an ESP32-S3 using RMT on ESP-IDF

This demonstrates using the RMT peripheral on the ESP32-S3 as a 10-bit serial transceiver.

The demo uses a shared GPIO pin (6) but can be separated to two pins. It initializes at 100kHz and begins sending a sequence of 10-bit numbers.

@kevinhikaruevans
kevinhikaruevans / Readme.md
Last active January 27, 2019 23:09
Using the debugger in VS Code on Windows for mbed

Debugging the L496ZG on Windows using VS Code

This only works for Windows, but you can easily modify it for Linux. It would roughly be the same, except you would need to modify the "linux" sections in the json files.

  1. Download OpenOCD for Windows: http://gnutoolchains.com/arm-eabi/openocd/ (you'll need 7zip to extract it).
    • OpenOCD-20181130.7z is used in this guide. If you use a different version, you'll have to update the json files.
  2. Install libusb and stlink drivers
  • the STLinkWinUSB drivers also have to be installed but I have no idea where to find those yet...
@kevinhikaruevans
kevinhikaruevans / electron-boilerplate NSIS template with portable option
Last active September 12, 2022 07:00
NSIS template for electron-boilerplate with portable installation option
; --------------------------------
; NSIS packaging/install script with portable option!
; Docs: http://nsis.sourceforge.net/Docs/Contents.html
; Made for electron-boilerplate
; Based off this answer by Anders:
; https://stackoverflow.com/questions/13777988/use-nsis-to-create-both-normal-install-and-portable-install
; --------------------------------
; --------------------------------
; Variables
164c164
< gnuplot = exec('gnuplot > '+options.filename, (options.exec ? options.exec : {}), options.finish || post_gnuplot_processing);
---
> gnuplot = exec('gnuplot > '+options.filename, (options.exec ? options.exec : {}), post_gnuplot_processing);
166c166
< gnuplot = exec('gnuplot | ps2pdf - '+options.filename, (options.exec ? options.exec : {}), options.finish || post_gnuplot_processing);
---
> gnuplot = exec('gnuplot | ps2pdf - '+options.filename, (options.exec ? options.exec : {}), post_gnuplot_processing);