Skip to content

Instantly share code, notes, and snippets.

View albertpb's full-sized avatar

AlbertP albertpb

  • Santiago, Chile
View GitHub Profile
@albertpb
albertpb / node-shell.nix
Created March 16, 2024 14:29
Node and Electron nix-shell
{ pkgs ? import <nixpkgs> { } }:
(pkgs.buildFHSUserEnv {
name = "sd-manager";
targetPkgs = pkgs: (with pkgs;
[
nodejs_20
typescript
nodePackages.typescript-language-server
libcxx
libpulseaudio
@albertpb
albertpb / SDXL_Prompt_Styles.txt
Created December 30, 2023 20:31 — forked from keturn/SDXL_Prompt_Styles.txt
SDXL styles - Credit for the prompts goes to MechanicalReproductions & sedetweiler.com - https://discord.com/channels/1002292111942635562/1089974139927920741/1130958251962417304
Style: Enhance
Positive: breathtaking {prompt} . award-winning, professional, highly detailed
Negative: ugly, deformed, noisy, blurry, distorted, grainy
Style: Anime
Positive: anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed
Negative: photo, deformed, black and white, realism, disfigured, low contrast
Style: Photographic
Positive: cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed
@albertpb
albertpb / ChatGPT Stable Diffusion prompts generator.txt
Last active December 3, 2023 20:43 — forked from bluelovers/ChatGPT Stable Diffusion prompts generator.txt
using ChatGPT as Stable Diffusion prompts generator
Stable Diffusion is an AI art generation model similar to DALLE-2.
Here are some prompts for generating art with Stable Diffusion.
Example:
- A ghostly apparition drifting through a haunted mansion's grand ballroom, illuminated by flickering candlelight. Eerie, ethereal, moody lighting.
- portait of a homer simpson archer shooting arrow at forest monster, front game card, drark, marvel comics, dark, smooth
- pirate, deep focus, fantasy, matte, sharp focus
- red dead redemption 2, cinematic view, epic sky, detailed, low angle, high detail, warm lighting, volumetric, godrays, vivid, beautiful
- a fantasy style portrait painting of rachel lane / alison brie hybrid in the style of francois boucher oil painting, rpg portrait
@albertpb
albertpb / ui-config.json
Last active November 26, 2023 14:55
ui-config automatic1111
{
"txt2img/Prompt/visible": true,
"txt2img/Prompt/value": "",
"txt2img/Negative prompt/visible": true,
"txt2img/Negative prompt/value": "(worst quality), (low quality), (normal quality), (((nsfw, nude))), bad-picture",
"txt2img/Interrupt/visible": true,
"txt2img/Skip/visible": true,
"txt2img/Generate/visible": true,
"txt2img/\u2199\ufe0f/visible": true,
"txt2img/\ud83d\uddd1\ufe0f/visible": true,
@albertpb
albertpb / blocking_api.py
Created October 22, 2023 00:26
oobabooga text-generation-webui api GET characters
import json
import ssl
import base64
import yaml
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from threading import Thread
from pathlib import Path
from extensions.api.util import build_parameters, try_start_cloudflared
from modules import shared
@albertpb
albertpb / dunstrc
Created January 16, 2020 22:25
Dunst config
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
[global]
font = Source Code Pro Black 11
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
#!/usr/bin/env python
import os
import sys
from hashlib import md5
from argparse import ArgumentParser
parser = ArgumentParser(description='Compare an S3 etag to a local file')
parser.add_argument('inputfile', help='The local file')
parser.add_argument('etag', help='The etag from s3')
args = parser.parse_args()
@albertpb
albertpb / jwtRS256.sh
Created April 11, 2019 20:02 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@albertpb
albertpb / nginx.conf
Created April 11, 2019 16:05 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048