Skip to content

Instantly share code, notes, and snippets.

@looki
looki / outpainting.py
Created September 13, 2022 02:23
Simple CLI for parlance-zz's outpainting noise generation script
# Code extracted from https://github.com/parlance-zz/g-diffuser-bot/tree/g-diffuser-bot-diffuserslib-beta
#
# `pip install numpy image scikit-image` should cover all dependencies, but they are probably installed if you're using SD.
#
# The GitHub recommends a denoising strength of 0.6 and config scale of 10.
# I've found a bit higher values for the denoising strength to work better, ymmv
import os, sys
from PIL import Image
@dawaltconley
dawaltconley / README.md
Last active November 16, 2023 19:52
Enabling hibernation with full disk encryption on Pop!_OS 21.04.

Enabling hibernation with full disk encryption on Pop!_OS 21.04.

I am recording the steps I took here to enable hibernation on a default Pop!_OS installation with full-disk encryption. I have written my commands as a single executable script in order to better understand how they all relate, but they probably should not be executed this way. Use this guide with caution and only if you understand what each command does.

I did all of this on Pop!_OS version 21.04, but swapfile hibernation is still working for me as of 22.04. I expect that the following steps will work for that as well, but I haven't tested it.

Using a swapfile

This is the simplest method if you used the default Pop installation, since it does not involve resizing any encrypted partitions.

@jasny
jasny / sha256-hmac.md
Last active January 6, 2026 23:12
Hashing examples in different languages

Example inputs:

Variable Value
key the shared secret key here
message the message to hash here

Reference outputs for example inputs above:

| Type | Hash |

@cyberang3l
cyberang3l / How to setup VirtualGL and TurboVNC on Ubuntu.md
Last active April 30, 2026 19:44
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@akatch
akatch / xboxdrv.service
Created October 24, 2014 01:54
systemd script for xboxdrv
# Systemd unit to enable xboxdrv driver for Xbox 360 controller
# Usage:
# save to /lib/systemd/system/xboxdrv.service
# to start: sudo service xboxdrv start
# to enable on boot: sudo systemctl enable xboxdrv
[Unit]
Description=Xbox controller driver daemon
[Service]