Skip to content

Instantly share code, notes, and snippets.

View MrModest's full-sized avatar

Kamil MrModest

View GitHub Profile
data class Playbook(
val name: String,
val hosts: Host[],
val remoteUser: User,
val varFiles: File[],
val vars: ObjectNode // need valitation so root will be only Map
val tasks: Task[]
)
sealed class ObjectNode {
# src/composes/immich/compose.d8s.yml
kind: compose
name: {{ .Name }}
serviceCommons: # shortcut to describe the same property value for each service
user: {{ .User }}
restart: {{ .RestartMode }}
networks:
- {{ .Networks.ReverseProxy }}
env: {{ .Name }}_envs # id of `env_vars` kind file
services:
@MrModest
MrModest / NoteDB
Last active September 21, 2024 09:13
NotesDB
- .vault/
- settings.yml
- templates/
- 7d6bc389-05af-46c7-b06b-a5b546fb99d3.yml
- db/
- db.sqlite // or Redis
- notes/
- cd5428b3-9d99-41f7-940f-0765a145ae83.md // or 1726839184.md
- assets/
- 960cd651-d3a4-482f-b5eb-119299f9ddc7.png
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
@MrModest
MrModest / datetime.md
Created January 10, 2025 09:37
SilverBullet functions (Library/Custom/Functions/datetime.md)
tags
meta
function getMonday(date) {
    const dayOfWeek = date.getDay();
    const diff = dayOfWeek >= 1 // 1 - for 'Monday', for Sunday - it will be '0'
      ? dayOfWeek - 1 // 1 - for 'Monday', for Sunday - it will be '0'
      : 6 - dayOfWeek;