Skip to content

Instantly share code, notes, and snippets.

View VonOx's full-sized avatar
🏠
Working from home

Vincent KULAK VonOx

🏠
Working from home
  • 4CAD Group
  • Douai, France
  • X @VonOx
View GitHub Profile
--- ./cpp/src/command_classes/AssociationCommandConfiguration.cpp
+++ ./cpp/src/command_classes/AssociationCommandConfiguration.cpp
@@ -182,8 +182,7 @@
if (Node* node = GetNodeUnsafe())
{
- Group* group = node->GetGroup(groupIdx);
- if ( NULL == group)
+ if (Group* group = node->GetGroup(groupIdx))
{
blueprint:
name: Mute Spotify free advertisements
description: Mute volume of smart-speaker when an advertisement is detected.
domain: automation
source_url: https://github.com/home-assistant/core/blob/9c5f608ffd5dc55a007403025e3a7c5894e7e2ea/homeassistant/components/automation/blueprints/mute_spotify_ads.yaml
input:
mediaplayer_entity:
name: Media Player
selector:
entity:
@VonOx
VonOx / z2mexpose.json
Last active September 14, 2021 09:02
[
{
"definition":null,
"endpoints":{
"1":{
"bindings":[
],
"clusters":{
"input":[
@VonOx
VonOx / 99-gladys-tty-rules
Created February 4, 2021 13:53
99-gladys-tty-rules
# Aeotec Zwave S2
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="tty-usb-zwave"
# Aeotec Zwave Gen5
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="tty-usb-zwave"
# ZWave.me UZB1 stick
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0280", SYMLINK+="tty-usb-zwave"
# Nortek Security & Control HUSBZB-1
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8a2a", SYMLINK+="tty-usb-zwave-zigbee"
# zigbee Texas CC2531
#!/bin/sh
npm run build-front
rm -rf ./static
cp -R ./front/build ./static
docker buildx create --name gladysbuilder && docker buildx use gladysbuilder
docker login
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx build --platform linux/arm/v6 --push -f docker/Dockerfile.buildx -t "terdious/gladys:pro" .
#!/bin/sh -e
logger -t "rc.firstboot" "Starting Gladys first boot actions"
logger -t "rc.firstboot" "Expanding root partition"
# Detect root partition device
ROOT_PART=$(mount | sed -n 's|^/dev/\(.*\) on / .*|\1|p')
if [ -z "$ROOT_PART" ] ; then
log_warning_msg "unable to detect root partition device"
docker network create -d macvlan \
--subnet=192.168.1.0/24 \
--gateway=192.168.1.254 \
-o parent=eth0 \
-o macvlan_mode=bridge vlanGladys
@VonOx
VonOx / tif-to-png.sh
Last active November 29, 2017 13:09
Convert all tif in png in single line
for f in *.tif; do echo "Converting $f"; convert "$f" "$(basename "$f" .tif).png"; done
@VonOx
VonOx / pihole_localhostname.md
Created January 26, 2017 19:37
Pi Hole / local hostname
  • Create a new hosts file
sudo nano /etc/hosts.mydomain

Add IP addresses followed by the local hostname you'd like to resolve, one per line. Write out and exit.

  • Create a new dnsmasq conf file
@VonOx
VonOx / CustomWindchillShell.cmd
Last active June 27, 2016 22:00
Windchill shell batch file
echo off
REM Set environment variables
set WT_HOME=E:\ptc\Windchill_10.1\Windchill
set JAVA_HOME=E:\ptc\Windchill_10.1\Java
REM go to the WT_HOME directory
cd /d %WT_HOME%
REM switch to the bin directory
pushd %WT_HOME%\bin