Skip to content

Instantly share code, notes, and snippets.

@welle
welle / .gitignore
Created September 18, 2025 11:23 — forked from AkdM/.gitignore
Daily backup Home Assistant configuration into a git repository
# You can whitelist files/folders with !, those will not be ignored.
# Everything that starts with a / are for root elements
# ignore
/custom_components/
/zigbee2mqtt/log
/zigbee2mqtt/state.json
/home-assistant_v2.* # Exclude Home Assistant history-related database. Make sure to enable git LFS if you don't exclude that, since those files can go easily over 100MB
/home-assistant.log*
/.ssh/
@welle
welle / ygg-api-download.yml
Created August 28, 2025 10:09 — forked from Clemv95/ygg-api-download.yml
Indexeur ygg-api pour jackett / prowlarr
---
id: yggapi
name: YggAPI
description: Indexeur non-officiel pour YggTorrent (YGG) - MOVIES / TV
language: fr-FR
type: private
encoding: UTF-8
testlinktorrent: false
links:
- https://yggapi.eu/
@welle
welle / getDependentPicklists.cls (2017 approach)
Created September 6, 2017 09:24 — forked from boxfoot/getDependentPicklists.cls (2017 approach)
Handle cases where one dependent option can be used for multiple controlling options
/*
* Apex doesn't expose dependent picklist info directly, but it's possible to expose.
* Approach:
* * Schema.PicklistEntry doesn't expose validFor tokens, but they are there, and can be accessed by serializing to JSON
* (and then for convenience, deserializing back into an Apex POJO)
* * validFor tokens are converted from base64 representations (e.g. gAAA) to binary (100000000000000000000)
* each character corresponds to 6 bits, determined by normal base64 encoding rules.
* * The binary bits correspond to controlling values that are active - e.g. in the example above, this dependent option
* is available for the first controlling field only.
*