Skip to content

Instantly share code, notes, and snippets.

View linuxipho's full-sized avatar

Rémi de Chazelles linuxipho

  • Montpellier
View GitHub Profile
@linuxipho
linuxipho / paques.py
Created February 13, 2024 11:46
Calcul Pâques
def paques(year):
a = year % 19
b = year // 100
c = year % 100
d = (19 * a + b - b // 4 - ((b - (b + 8) // 25 + 1) // 3) + 15) % 30
e = (32 + 2 * (b % 4) + 2 * (c // 4) - d - (c % 4)) % 7
f = d + e - 7 * ((a + 11 * d + 22 * e) // 451) + 114
month = f // 31
day = f % 31 + 1
return year, month, day
blueprint:
name: ZHA - Tuya 3-Button Scene Switch
description: Automate your Tuya 3-Button Scene Switch using ZHA events.
domain: automation
input:
tuya_3button_scene_switch:
name: Tuya 3-Button Scene Switch
description: Tuya 3-Button Scene Switch to use
selector:
device:
@linuxipho
linuxipho / mount_vbox_shared_boot.md
Created November 14, 2023 11:22 — forked from kentwait/mount_vbox_shared_boot.md
Mount VirtualBox shared folder on boot using fstab

How to mount a VirtualBox shared folder when the Guest OS boots

Problem

While using VirtualBox's Guest Additions to mount shared folders provides a seamless way to mount shared folders, there are also disadvantages.

  • Shared folders will always mount in /media/sf_(share name) unless specified using through vbox drivers in the guest OS
  • Mounting does not happen at boot-time. Applications that require paths at boot will not be able to access the shared folder even after it is mounted - such as Docker.

Solution

Instead of relying on Guest Additions, if you have sudo permissions, shared folders can be mounted at boot-time using fstab. Using this approach allows