Skip to content

Instantly share code, notes, and snippets.

View n1ywb's full-sized avatar

Jeff Laughlin n1ywb

View GitHub Profile
jeff@ta00491-Jeff ~/esp/hello_world $ make monitor
fatal: Not a git repository: /home/ivan/esp-idf/.git/modules/components/aws_iot/aws-iot-device-sdk-embedded-C
MONITOR
--- idf_monitor on /dev/ttyUSB1 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
@n1ywb
n1ywb / canvas-d3.markdown
Created September 22, 2018 04:56
canvas d3
@n1ywb
n1ywb / vfs.js
Created May 13, 2019 17:15
start of a node based virtual file system monkey patch for fs module
/** Experimental virtual file system thing
* it doesn't really work with the sync FS api
* untested
*/
const MAX_FILE_SIZE = 1024 * 1024 * 10 // 10MB
class CachedFile {
constructor (cache, path, { maxFileSize = MAX_FILE_SIZE }) {
this.cache = cache
// TODO auto-allocate new buffer when it fills
@n1ywb
n1ywb / locking-store.js
Last active May 13, 2019 17:16
optimistically locking store wrapper for node cache manager
/**
* Experimental optimistically-locking cache-manager store wrapper
*
* Completely untested; caveat emptor
*/
const inspect = require('util').inspect
export const LOCK_TIMEOUT = 5000
export const LOCK_EXTEND_TIMEOUT = 2500
@n1ywb
n1ywb / link.py
Last active August 2, 2020 22:51
scrounge a dir tree for wanted files