Skip to content

Instantly share code, notes, and snippets.

sb — Sandbox Runner for Untrusted Programs

Why this exists

Every day, developers and users install software they haven't fully audited: cloned repos, pip packages, npm modules, random tools from GitHub. Each of these pulls in dependency trees that nobody reads line by line. Sometimes the malware isn't even in the project itself — it's in a transitive dependency that got compromised upstream.

The standard advice is "use containers" or "run it in a VM." But the reality is that most people don't. Setting up full containerization for every project you want to try is friction that almost nobody accepts in daily workflow. The result is a massive gap: millions of developers running unvetted code with full access to their filesystem, network, credentials, and SSH keys.

Existing tools each cover part of the problem but none cover the practical workflow:

#!/usr/bin/env perl
use v5.36;
use bansi;
# Quick-pick UI helpers for Debian/KDE projects
# - Sections: GUI / TUI / GUI-Application-Launcher
# - Sorted by robustness in each section
# - Shows concise feature overviews and runnable one-line examples
#
# Hints:
User (NON-deep):
comparison of characteristics of texts captured by different common small vector embeddings. What types of things are captured/represented in each of them? We should include the most common 20 to 40 depending on variations/information spread, and include model memory consumption and speed along with the details on what's captured or what they excel in and what they miss. An estimated popularity rank should be included but it doesn't need to be reliable. Only models runnable locally/foss. Before we begin, help me resume this request for a deep research prompt; I'm not actually sure if I'm asking the right questions. I want a reference I can turn to for making decisions on model use when working on different projects. We should include less popular models as well if they have special characteristics making them more suitable for some tasks.
cgpt:
Great target. Here’s a tight research brief + “ready-to-run” master prompt that locks scope, outputs, and criteria so we can build a dependable, deci
#!/usr/bin/env python3
# embed-search
# Takes query text (utext) on the commandline,
# and many lines of text from stdin or a file (lines).
# Outputs the highest semantically-matching line(s)
# gist-paste -u https://gist.github.com/jaggzh/d57ef8757c10e945d99c77f91449e33a embed-search-wrapped
# Dependencies:
#!/usr/bin/env python3
# gist-paste -u https://gist.github.com/jaggzh/47b1c58617601b5aaab9da6233aaeae1 mapper-linear
import json
import datetime
import folium
from folium.plugins import TimestampedGeoJson
# Load the fire perimeter data
with open("query-to-2025-01-09_23-14pm.json") as F:
data = json.load(F)
#!/bin/bash
# Source at: https://gist.github.com/jaggzh/4f4159b1b137cbc9553efb7d8364f0c9
. ansi.sh # ansi.sh from: https://gist.github.com/jaggzh/6b3746475bbde5a077dfaeae793b7d1f
bgblu=$'\e[44m'
bmag=$'\e[35m'
whi=$'\e[37m'
rst=$'\e[0m'
# blank to disable
@jaggzh
jaggzh / plotter.py
Last active December 19, 2024 17:04
#!/usr/bin/env python3
# Copyleft 2024 jaggz.h {over yonder at} gmail.com
# jaggzh @ reddit
# Usage:
# python plotter.py -i defocus.ods -o defocus.png
# Gist url for this script:
# https://gist.github.com/jaggzh/f4aea3e8c09363bf4924b8bd2f80895d
@jaggzh
jaggzh / spect
Last active August 12, 2024 22:16
#!/bin/bash
# gist-paste -u https://gist.github.com/jaggzh/f687be9a23d267e641dc7ff7a1967b9a spect
# Dependencies:
# ffmpeg (we extract audiosecs=60 for the spectrogram)
# sox (for spectrogram image creation)
# chafa (for conversion of spectrogram to text)
tmpdel_s=$((60)) # 5 minutes
def_maxh=5
def_maxh_1=16 # Height for 1 file
def_maxh_2=10 # Height for each of 2 files
readcountdown1 () {
if [[ "$#" -lt 3 ]]; then
cat <<-EOT
Accepts a single char of user input
Usage: readcountdown1 seconds variable message
Ex: readcountdown1 5 inp '(d)elete (anything else exits)'
gives 5 seconds and sets inp if anything (even enter) entered
returns 0 on success, 1 for timeout
EOT
return 1
@jaggzh
jaggzh / ansi.sh
Last active December 30, 2024 08:27
# gist-paste -u https://gist.github.com/jaggzh/6b3746475bbde5a077dfaeae793b7d1f
bgbla=''; bgred=''; bggre=''; bgbro='';
bgblu=''; bgmag=''; bgcya=''; bggra='';
bla=''; red=''; gre=''; bro='';
blu=''; mag=''; cya=''; gra='';
bbla=''; bred=''; bgre=''; yel='';
bblu=''; bmag=''; bcya=''; whi='';
rst=''; inv=''; cll=''; cllr='';
cls=''; clsb='';