Skip to content

Instantly share code, notes, and snippets.

@hiorws
hiorws / config.yml
Created June 2, 2025 19:06
Home Assistant cloudflared config
tunnel: home-assistant
credentials-file: /home/pi/.cloudflared/home-assistant.json
ingress:
- hostname: YOUR_DOMAIN
service: http://localhost:8123
- service: http_status:404
@hiorws
hiorws / docker-compose.yml
Created June 2, 2025 18:03
Home Assistant docker compose file
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- ./config:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
@hiorws
hiorws / gist:e300c8c8ebb5b6481eddac701abf51dc
Created December 19, 2024 08:21
ColoredSidebarItems.css
/*------------------------------------------------------------------------------
Obsidian Colored Sidebar Items by CyanVoxel v2.0.0
A colored sidebar CSS snippet inspired by
the "Coloured Folders" snippet by Lithou.
This snippet targets folders beginning with numbered prefixes, and applies full
color formatting based on the root colors listed below. The prefixes are both
customizable and extensible; feel free to change, add, and remove them based on
your own titles and vault structure! By default I have a range of 8+1 colors,
# global configs
set -g prefix C-s
bind r source-file ~/.tmux.conf \; display "Bang!"
bind-key c new-window -n 'term'
# setw -g mode-keys vi
set-option -g history-limit 3000
@hiorws
hiorws / ChatGPT Stable Diffusion prompts generator.txt
Created April 4, 2023 13:13 — 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:
- portait of a homer simpson archer shooting arrow at forest monster, front game card, drark, marvel comics, dark, intricate, highly detailed, smooth, artstation, digital illustration
- pirate, concept art, deep focus, fantasy, intricate, highly detailed, digital painting, artstation, matte, sharp focus, illustration
- ghost inside a hunted room, art by lois van baarle and loish and ross tran and rossdraws and sam yang and samdoesarts and artgerm, digital art, highly detailed, intricate, sharp focus, Trending on Artstation HQ, deviantart, unreal engine 5, 4K UHD image
- red dead redemption 2, cinematic view, epic sky, detailed, concept art, low angle, high detail, warm lighting, volumetric, godrays, vivid, beautiful, trending on artstation
- a fantasy style portrait painting of rachel lane / alison brie hybrid in the style of francois boucher oil painting unreal 5 daz.
@hiorws
hiorws / install_docker.sh
Created November 29, 2022 16:42
Installing Docker and docker-compose on Ubuntu 22.04
#!/bin/bash
# Installing Docker
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
@hiorws
hiorws / amazon-rekognition.md
Created May 20, 2022 14:53 — forked from alexcasalboni/amazon-rekognition.md
Amazon Rekognition - Python Code Samples

Amazon Rekognition - Python Code Samples

  1. Labels Detection
  2. Faces Detection
  3. Faces Comparison
  4. Faces Indexing
  5. Faces Search
@hiorws
hiorws / docker-compose.advanced.yml
Created January 1, 2022 20:40 — forked from w33ble/docker-compose.advanced.yml
Using jwilder/nginx-proxy with multiple compose files
version: '3'
services:
nginx-proxy:
image: nginx:alpine
container_name: proxy-nginx
environment:
- DEFAULT_HOST=hello.local
ports:
- 80:80
@hiorws
hiorws / init.sh
Last active June 19, 2022 15:08 — forked from m-radzikowski/script-template.sh
Ubuntu 20.04 Server Initialization Script includes Docker & Docker Compose Installation
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
DOCKER_COMPOSE_VERSION=v2.6.0
usage() {
cat <<EOF
@hiorws
hiorws / sketch_hires_lores.pde
Last active December 13, 2020 19:11 — forked from jorgenys/sketch_hires_lores.pde
High resolution rendering with Processing, Part 2
PGraphics render;
int printWidth = 10;
int printHeight = 6;
int printDpi = 300;
int previewDpi = 72;
boolean renderHighRes = false;
boolean firstFrame = true;