Skip to content

Instantly share code, notes, and snippets.

View cpietsch's full-sized avatar
💭
in the void

Christopher Pietsch cpietsch

💭
in the void
View GitHub Profile
@cpietsch
cpietsch / down.sh
Created February 24, 2024 20:10
download civicai models on command line
curl -JL --remote-name -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" https://civitai.com/api/download/models/XXX
@cpietsch
cpietsch / extract.sh
Created August 16, 2023 15:39
bash script to extract automatic1111 output image metadata and generate a csv
#!/bin/bash
# Path to the directory containing folders with images
base_dir="/home/jovyan/stable-diffusion-webui/outputs/txt2img-images"
# Path to the ExifTool executable
exiftool_path="/home/jovyan/Image-ExifTool-12.65/exiftool"
# Loop through each folder in the base directory
for folder in "$base_dir"/*; do
@cpietsch
cpietsch / convert.py
Created August 16, 2023 15:38
Here we convert all the automatic1111 pngs into jpgs and add the custom metadata
import os
from PIL import Image
from PIL import ExifTags
import glob
def convert_png_to_jpg(png_path, jpg_path):
png_files = glob.glob(os.path.join(png_path, '**/*.png'), recursive=True) #[:1]
# print(png_files)
for png_file in png_files:
@cpietsch
cpietsch / Artillery.ini
Created July 23, 2023 18:05
Artillery prusaslic3r ini
###############
# AUTHOR: Szabolcs Hornyak / design85@gmail.com
# https://szabolcs.eu/2020/12/29/prusaslicer-sw-x1-genius/
###############
## Artillery Hornet printer profile is based on PR https://github.com/slic3r/slic3r-profiles/pull/14 created by https://github.com/newbeetle
# Print profiles for the Artillery printers.
[vendor]
@cpietsch
cpietsch / install.md
Created January 18, 2023 12:35
Lovelace Optimization for Stable Diffusion on Linux (Automatic1111/InvokeAI)

Lovelace Optimization for Stable Diffusion

Currently you will need to hotfix/manually update some packages in order to get the performance you deserve when using a lovelace gpu (4080/4090/etc)

Automatic1111

I am attesting that this GitHub handle cpietsch is linked to the Tezos account tz1X4sxpgg5X6aag4Mf1TmdWTrDbx3jBFwyT for tzprofiles
sig:edsigttRYKYY5rFmaLSW2S6zGJJC5dUcF7LVy24fR4P5kvQ3JVxgXfftChT4oH8FcbQaehLAhGYdPcYcEyRy8jDLDgF7WFqbyDN
@cpietsch
cpietsch / command
Created May 17, 2022 19:19
e3dc post history to firebase
jq -ncM "$(cat ./input.jq)" | ./e3dc -splitrequests | jq -cM "$(cat ./output.jq)" | jq '.result.DB_HISTORY_DATA + {"date":{".sv": "timestamp"}}' | curl -X POST -d @- https://XXXX.europe-west1.firebasedatabase.app/history.json
sources:
- https://knx-user-forum.de/forum/%C3%B6ffentlicher-bereich/knx-eib-forum/diy-do-it-yourself/1614158-neue-library-f%C3%BCr-rscp-kommunikation-mit-e3dc-speicher-inkl-kommandozeilen-utility
@cpietsch
cpietsch / steps.sh
Created May 17, 2022 18:43
compile jq for arm64 (raspberry pi)
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz
tar xvfz jq-1.6.tar.gz
cd jq-1.6/
autoreconf -vfi
modules/oniguruma
autoreconf -vfi
cd ../..
./configure --with-oniguruma=builtin
make -j8
sudo make install
@cpietsch
cpietsch / shutdown.sh
Created November 28, 2021 14:57
shutdown linux when amdgpu reaches junction temperature
#!/bin/sh
maxTemp="+64"
while true; do
currTemp=$(sensors | awk '/junction/ {print $2}' | cut -d"." -f1)
if [[ $currTemp > $maxTemp ]]; then
shutdown now
echo "too high"
fi
Serial
- https://openwrt.org/toh/tp-link/re450#serial
- https://forum.openwrt.org/t/tp-link-re450-brick-after-trying-to-return-the-original-firmware/10563/13
- https://forum.openwrt.org/t/help-please-110-re450-bricked/7641/12
Tftp
- https://forum.freifunk.net/t/router-recovery-tftp-pushbutton-und-ttl-serial-recovery/8691
- https://community.tp-link.com/en/home/forum/topic/81462?page=1
- https://mikepalmer.net/tp-link-archer-c7-ac1750-v2-tftp-recovery/