Skip to content

Instantly share code, notes, and snippets.

View lss233's full-sized avatar
🐱
This user is a cat.

Dark Litss lss233

🐱
This user is a cat.
View GitHub Profile
# Script for converting a HF Diffusers saved pipeline to a ControlNet checkpoint.
# *Only* converts the ControlNet.
# Does not convert optimizer state or any other thing.
import argparse
import os.path as osp
import re
import torch
from safetensors.torch import load_file, save_file
@Austcool-Walker
Austcool-Walker / ubuntu-google-chrome-install.md
Last active December 30, 2022 12:21
Install Google Chrome on Ubuntu/Debian

Run these commands in order in TTY or Terminal.

wget -qO - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list
@justisr
justisr / TitleUpdater.java
Last active July 6, 2023 03:26
Update an inventory name while opened without NMS
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import com.gmail.justisroot.autoecon.data.ServerSpecs;
// imports ...
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldBorder;
import net.minecraft.server.v1_8_R3.WorldBorder;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
CraftPlayer cp = (CraftPlayer) p;
WorldBorder w = new WorldBorder();
w.setSize(1);
import socket
import struct
import json
def unpack_varint(s):
d = 0
for i in range(5):
b = ord(s.recv(1))
d |= (b & 0x7F) << 7*i
if not b & 0x80: