Skip to content

Instantly share code, notes, and snippets.

View tonyGERR's full-sized avatar

Tony tonyGERR

View GitHub Profile
@tonyGERR
tonyGERR / cosmoc++
Created October 21, 2024 17:22 — forked from jart/cosmoc++
Cosmopolitan Libc Toolchain
#!/bin/sh
# replacement for c++ command
#
# we assume you run the following beforehand
#
# sudo chmod 1777 /opt
# cd /opt
# git clone https://github.com/jart/cosmopolitan cosmo
# cd cosmo
# make -j
@tonyGERR
tonyGERR / llm-browser.py
Created October 21, 2024 17:20 — forked from jart/llm-browser.py
Using an LLM as an HTTP proxy with LLaMAfile
#!/usr/bin/env python
import socket
import threading
import subprocess
def handle_client(client_socket):
request = client_socket.recv(8192).decode('utf-8', errors='ignore')
first_line = request.split('\n')[0]
@tonyGERR
tonyGERR / rename-pictures.sh
Created October 21, 2024 17:03 — forked from jart/rename-pictures.sh
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <[email protected]>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command: