Skip to content

Instantly share code, notes, and snippets.

@daveschumaker
daveschumaker / sd-http-server.py
Last active March 18, 2024 13:13
A simple http server for Stable Diffusion that can generate images using a simple RESTful API using the lstein / InvokeAI fork of Stable Diffusion.
# pylint: disable=broad-except
# pylint: disable=global-statement
# pylint: disable=invalid-name
# pylint: disable=no-member
# pylint: disable=unsupported-membership-test
"""Creates a proxy server to interface with the stable diffusion engine using http requests"""
import base64
from json import dumps
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 6, 2024 15:28
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@y-polek
y-polek / build.gradle
Last active February 5, 2022 15:30
Gradle: Read property from file
/**
* Read property with {@code propertyName} from file with {@code fileName}.
* <p>
* Example of property file content:<br>
* api_key=5c7f743fe85eae73489af35c1a387a05
* apiSecret=12345678910
*
* @return Value of specified property.
* @throws GradleException if file not found or there is no specified property in a file.
*/
@danmou
danmou / wall.sh
Last active February 15, 2024 13:20
Replacement for the unix wall command, which also works with gnome-terminal
#!/bin/bash
usage="
Usage:
wall [options] [message]
Write a message to all users.
Options:
-n, --nobanner do not print banner
@pksunkara
pksunkara / config
Last active April 28, 2024 18:59
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta