Skip to content

Instantly share code, notes, and snippets.

View rdrouche's full-sized avatar

Romain rdrouche

View GitHub Profile
@rdrouche
rdrouche / docker-compose.yml
Created July 29, 2024 12:26
Z2M Docker Compose
services:
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- ./data:/app/data
- /run/udev:/run/udev:ro
ports:
# Frontend port
#!/bin/bash
sudo apt update
sudo apt upgrade -y
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Sonoff model P
port: /dev/ttyUSB0
# Sonoff model E
port: /dev/ttyACM0
adapter: ezsp
# ConBee
adapter: deconz
base_topic: zigbee2mqtt
server: mqtt://core-mosquitto:1883
user: mqtt
password: xxxxyyyyy
@rdrouche
rdrouche / templates.yaml
Created July 19, 2024 12:52
Home Assistant - Template sensor sample
- sensor:
- name: "TV Conso"
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "total_increasing"
state: "{{ states('sensor.pc_tv_today_energy') }}"
template: !include templates.yaml
@rdrouche
rdrouche / ha-automatisation-cycle-colors.yaml
Created July 16, 2024 13:33
Cycle color automatisation in Home Assistant
action:
- service: light.turn_on
data:
color_name: "{{ states('input_select.romane_couleurs_liste') }}"
target:
entity_id: light.0xa4c13874bb925e5a
- service: input_select.select_next
target:
entity_id: input_select.romane_couleurs_liste
data:
@rdrouche
rdrouche / github_desktop_ubuntu.sh
Created November 30, 2021 13:44 — forked from berkorbay/github_desktop_ubuntu.md
To install Github Desktop for Ubuntu
## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest
# UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows
sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.9.3-linux3/GitHubDesktop-linux-2.9.3-linux3.deb
### Uncomment below line if you have not installed gdebi-core before
# sudo apt-get install gdebi-core
sudo gdebi GitHubDesktop-linux-2.9.3-linux3.deb
# UPDATE (2021-03-05): Thanks to PaoloRanzi81's comment, the updated code is as follows https://gist.github.com/PaoloRanzi81
@rdrouche
rdrouche / nginx.conf
Created November 30, 2021 09:59 — forked from taddev/nginx.conf
Nginx reverse proxy to Exchange 2010/2013
server {
listen 80;
#listen [::]:80;
server_name mail.gwtest.us autodiscover.gwtest.us;
return 301 https://$host$request_uri;
}
server {
listen 443;
#listen [::]:443 ipv6only=on;
# nginx@nginx:~$ cat /etc/nginx/sites-available/outlook.conf
server {
listen 192.168.128.2:80;
server_name yourdomain.com;
return 301 https://yourdomain.com$request_uri;
}
server {
listen 192.168.128.2:443;