Skip to content

Instantly share code, notes, and snippets.

Using Batocera for a Visual Pinball Cabinet

Disclaimer

The multi-monitor support information below is based on personal experimentation and is not supported by the Batocera team. Please do not contact them for assistance with this setup.

Initial Setup

  1. Download the latest Batocera beta at: https://mirrors.o2switch.fr/batocera/x86_64/beta/last/
@rnorth
rnorth / update_device_areas.py
Last active January 28, 2025 10:34
Home Assistant pyscript to mass-update device areas
import homeassistant
@service
def update_device_areas():
devreg = homeassistant.helpers.device_registry.async_get(hass)
entreg = homeassistant.helpers.entity_registry.async_get(hass)
areareg = homeassistant.helpers.area_registry.async_get(hass)
area_ids = []
@crundberg
crundberg / gist:a77b22de856e92a7e14c81f40e7a74bd
Last active April 27, 2024 16:51
Setup deCONZ on unprivileged Proxmox container

Setup deCONZ on unprivileged Proxmox container

Preparation on host

First find your Conbee with lsusb and note the ID. The vendor is 1cf1 and the product is 0030.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
Bus 001 Device 003: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
function t(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(e,s,o):n(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o}const e=new WeakMap,s=t=>"function"==typeof t&&e.has(t),i=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,n=(t,e,s=null)=>{let i=e;for(;i!==s;){const e=i.nextSibling;t.removeChild(i),i=e}},r={},o={},a=`{{lit-${String(Math.random()).slice(2)}}}`,l=`\x3c!--${a}--\x3e`,h=new RegExp(`${a}|${l}`),c="$lit$";class d{constructor(t,e){this.parts=[],this.element=e;let s=-1,i=0;const n=[],r=e=>{const o=e.content,l=document.createTreeWalker(o,133,null,!1);let d=0;for(;l.nextNode();){s++;const e=l.currentNode;if(1===e.nodeType){if(e.hasAttributes()){const n=e.attributes;let r=0;for(let t=0;t<n.length;t++)n[t].value.indexOf(a)>=0&&r++;for(;r-- >0;){const n=t.strin
@hendriks73
hendriks73 / musicxml.js
Last active June 10, 2020 19:20
JXA-based JavaScript that creates an XML file for Music.app like iTunes used to create before macOS 10.15.
/***********************************************************************
* JXA-based JavaScript that creates an XML file for Music.app like *
* iTunes used to create before macOS 10.15. *
* *
* NOTE: The XML is not identical, but a best effort is made. *
* Missing are for example all B64-encoded smart data and the *
* protected flag as well as certain distinguished playlists *
* kinds. For a real replacement, use the ITLibrary API . *
* *
* USAGE: *
@flobernd
flobernd / Homebridge-WebStorm.md
Last active December 4, 2019 17:03
Tutorial: Setting up WebStorm for Homebridge plugin development

Setting up WebStorm for Homebridge plugin development

This tutorial shows how to set up a new Homebridge plugin project using the WebStorm IDE and how to make it debuggable by creating a custom Run/Debug configuration.

Requirements

The following tools are used and expected to be installed:

@tonyklawrence
tonyklawrence / gist:b477dcf624577ab154ed3b51cea60e27
Last active July 10, 2024 03:43
Docker containers using VLAN network on Synology DSM 6.X
First we need to create the VLAN on the Synology from the command line:
See: https://nielshagoort.com/2016/03/30/synology-vlan-tagging/
Then add Network to Docker using maclvan driver
See: https://docs.docker.com/engine/userguide/networking/get-started-macvlan/#macvlan-8021q-trunk-bridge-mode-example-usage
Details...