Skip to content

Instantly share code, notes, and snippets.

@jcarletto27
jcarletto27 / p40_prepare.sh
Created August 12, 2026 20:20
used to transition from open drivers to the closed ones needed for older pascal ai accellerators
#!/usr/bin/env bash
# Transition an NVIDIA installation on Debian to the proprietary R580 branch.
# Intended for a Pascal Tesla P40. This script does not change CUDA toolkits.
set -Eeuo pipefail
readonly TARGET_BRANCH="580"
readonly PIN_PACKAGE="nvidia-driver-pinning-${TARGET_BRANCH}"
readonly DRIVER_PACKAGE="cuda-drivers-${TARGET_BRANCH}"
#!/bin/bash
######################ABOUT###########################
# this plus split_library.py in the same folder
# allow for relative symlinking in such a way that docker audiobookshelf
# can scan and utilize a logical library system instead of a hardlinked one
# can support any number of account nicknames
#####################################################
#!/usr/bin/env python
# python script to search a folder for directories beginning with a string pattern
# and create a symlink, I use this for splitting out my Libation audible accounts
# for different libraries on AudioBookShelf
# can be used standalone or from the companion shell script proc_library.sh
import os
import sys
import subprocess
#!/bin/bash
# My raspberry pi 5 is constantly disconnecting the USB hardrive after a few hours with nothing really showing in the logs
# so i created this script to check to see if it's still showing, and if not reset the hub and authorization and then remount all drives
#You need to use lsusb or usb-devices to find the Vendor and prod ids usually like 152d:0580 or Vendor=152d ProdID=0580
#You'll also need uhubctl installed to to toggle power to the hubs
## use this command to download it, set it and add it to the crontab
##
@jcarletto27
jcarletto27 / OBJExporter.js
Last active September 25, 2023 16:34
Three.js OBJExporter, updated to work with bufferGeometry. Adds support for bones and morph data.
THREE.OBJExporter = function () {};
THREE.OBJExporter.prototype = {
constructor: THREE.OBJExporter,
parse: function (object) {
var output = '';
@jcarletto27
jcarletto27 / STLExporter.js
Last active November 18, 2025 11:47
updated Three.js STLExporter to export model including morphTargets
/**
* Based on https://github.com/mrdoob/three.js/blob/a72347515fa34e892f7a9bfa66a34fdc0df55954/examples/js/exporters/STLExporter.js
* Tested on r68 and r70
* @author jcarletto / https://github.com/jcarletto27
* @author kjlubick / https://github.com/kjlubick
* @author kovacsv / http://kovacsv.hu/
* @author mrdoob / http://mrdoob.com/
*/
THREE.STLExporter = function () {};