Skip to content

Instantly share code, notes, and snippets.

View ervwalter's full-sized avatar

Erv Walter ervwalter

View GitHub Profile
@ervwalter
ervwalter / migrate.py
Last active June 25, 2024 07:57
Migrate files in cephfs to a new file layout pool recursivly
import os
import shutil
import logging
import sys
from concurrent.futures import ThreadPoolExecutor
import threading
import uuid
import xattr
start_directory = '.' # current directory
@ervwalter
ervwalter / ceph-cache-pool.md
Created May 3, 2024 13:11 — forked from kalaspuffar/ceph-cache-pool.md
Setting up a caching pool in your Ceph cluster.

Adding caching tier to your filesystem

First we need to check our pools and create a new cache pool.

sudo ceph osd lspools
sudo ceph osd pool create hot_storage 32

Next up we setup the pool as a tier for your data drive and change the mode to writeback which means that you first write to it before flushing it back to your slower drives. readproxy is better if you have the same kind of speed on your pools as it writes to the data drive and then adds entries to your cache pool when read often.

@ervwalter
ervwalter / presence_non_binary.yaml
Last active April 11, 2024 01:58 — forked from VynDesign/presence_non_binary.yaml
Making Home Assistant’s Presence Detection not so Binary
blueprint:
name: "Presence Status Update"
description: Making Home Assistant’s Presence Detection not so Binary
domain: automation
input:
person_device_tracker:
name: Person
description: This is the person entity to read the basic home/away presence
selector:
entity:
@ervwalter
ervwalter / presence_non_binary.yaml
Created April 11, 2024 01:58 — forked from VynDesign/presence_non_binary.yaml
Making Home Assistant’s Presence Detection not so Binary
blueprint:
name: "Presence Status Update"
description: Making Home Assistant’s Presence Detection not so Binary
domain: automation
input:
person_device_tracker:
name: Person
description: This is the person entity to read the basic home/away presence
selector:
entity:
location /authelia {
internal;
set $upstream_authelia http://authelia:9091/api/verify; #ADD YOUR IP AND PORT OF AUTHELIA
proxy_pass_request_body off;
proxy_pass $upstream_authelia;
proxy_set_header Content-Length "";
# Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
client_body_buffer_size 128k;
# Source: https://gist.github.com/d2f36b05bf959e5fc91497ea3f0dceb3
#######################################################
# Free Docker Desktop Alternative For Mac And Windows #
# https://youtu.be/LGNEG-t96eE #
#######################################################
# Referenced videos:
# - How to run local multi-node Kubernetes clusters using kind: https://youtu.be/C0v5gJSWuSo
# - K3d - How to run Kubernetes cluster locally using Rancher k3s: https://youtu.be/mCesuGk-Fks
@ervwalter
ervwalter / README.md
Created August 6, 2021 15:55 — forked from csandman/README.md
A Chakra UI wrapper for react-select, made to be used as a multi-select which Chakra does not currently have

Chakra React Select

In order to use this component, you can implement it and use it like you would normally use react-select. It should accept all of the props that the original takes, however customizing the theme or the components could break this implementation. There are also, however, a few extra things you can do with this wrapper that pull from the chakra library.

  • You can pass the size prop with either sm, md, or lg. These will reflect the sizes available on the Chakra <Input /> component (with the exception of xs because it's too small to work).
  • In your options objects, you can add the key isFixed to emulate the example in the react-select docs.
  • You can pass the colorScheme prop to the select component to change all of the selected options tags' colors. You can view the whole list of available color schemes in [the Chakra docs
@ervwalter
ervwalter / dev-boxstarter-bootstrap.ps1
Last active December 12, 2022 18:31
Bootstrapping a dev machine
<#
From an Admin Powershell window:
install-boxstarterpackage -PackgeName <RAW GIST URL>
#>
#####################
# PREREQUISITES
#####################