+++ title = "Debugging Rust with Vim's Termdebug" path = '/2025/vim-rust-termdebug' description = 'My search for a debugger workflow.' date = '2025-07-20' draft = true
[taxonomies] tags = [ 'programming',
+++ title = "Debugging Rust with Vim's Termdebug" path = '/2025/vim-rust-termdebug' description = 'My search for a debugger workflow.' date = '2025-07-20' draft = true
[taxonomies] tags = [ 'programming',
const { S3Client, ListObjectsV2Command } = require("@aws-sdk/client-s3"); | |
const client = new S3Client({ | |
region: 'us-east-1', | |
credentials: { | |
accessKeyId: process.env['EYEBROWSE_S3_ACCESS_KEY'], | |
secretAccessKey: process.env['EYEBROWSE_S3_SECRET_ACCESS_KEY'], | |
}, | |
clientSideMonitoring: true | |
}); |
// write array `a` onto array `b` starting at position `p` | |
function overlay(a, b, p) { | |
for (let [i, n] of a.entries()) { | |
b[p+i] = n; | |
} | |
return b; | |
} | |
// in an array, swap items at indexes i1 and i2 | |
function swap(arr, i1, i2) { |
<!-- Pull in pfelement.css --> | |
<link rel="stylesheet" href="https://unpkg.com/@patternfly/pfelement/dist/pfelement.min.css"> | |
<!-- Add an import statement for each PatternFly Element you want .ES Modules++ --> | |
<script type="module"> | |
import "https://unpkg.com/@patternfly/pfe-card/dist/pfe-card.min.js"; | |
import "https://unpkg.com/@patternfly/pfe-cta/dist/pfe-cta.min.js"; | |
</script> |
<script type="module" src="https://unpkg.com/@patternfly/pfe-icon@latest/pfe-icon.js"></script> |
<p>I am your snippet.</p> |
#!/usr/bin/env bash | |
# usage: memlog.sh PID | |
# requires gnuplot and matplotlib (dnf install python2-matplotlib gnuplot) | |
PID=$1 | |
LOG=./$PID.log | |
PNG=./$PID.log.png | |
echo recording memory usage for PID $PID |
<script src="typed.js"></script> |
#!/bin/bash | |
# USAGE: gif SECONDS FILENAME | |
# example: gif 4 out.gif | |
# then drag a box :D | |
# Delay before starting | |
DELAY=0 | |
# Duration and output file |
/** | |
* Wrap your function such that it will be executed every N times it's called. | |
* This is useful in a long-running loop such as the main loop in a game, where | |
* you want to execute certain functions every 10 frames, or similar, but don't | |
* want to manage a dozen separate "timers". | |
* | |
* @param {Function} f the function to wrap | |
* @param {Number} n execute the function every `n` times | |
*/ | |
function nth(f, n) { |