Skip to content

Instantly share code, notes, and snippets.

@nosuchuser
nosuchuser / hostname.conf
Created April 20, 2018 12:18 — forked from krusynth/hostname.conf
Apache log format that shows the hostname
LogFormat "%h %l %u %t \"%m http://%{Host}i%U %H\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" hostnames
CustomLog "/private/var/log/apache2/access_log" hostnames
@nosuchuser
nosuchuser / gist:3a67d06bb054273ef390d4a2ed4a5d89
Last active December 21, 2021 18:48
Configuração Vodafone FTTH / pihole
1. Configurar IPv4 estático e IPv6 estático no pihole (YMMV)
192.168.1.2 e 2001:818:xxxx::192:168:1:2 no meu caso
2. Configurar DNS uplink do pihole igual ao IP do Router (192.168.1.1)
3. Configurar Router
Huawei HS8247W (Smart Router 2)
1. Configurações Avançadas -> LAN -> Configuração de DHCP
Servidor DNS Primário: 192.168.1.2
@nosuchuser
nosuchuser / gist:21db3fdd9f4b80bf0910f8b8b6ea2f63
Created March 4, 2018 18:54
dnsmasq.conf configuration for vodafone IPTV
server=/.iptvpoc.alu/.discovery.iptv.microsoft.com/.iptv.vodafone.pt/.iptvdiscovery/.ims.vodafone.pt/192.168.1.1
@nosuchuser
nosuchuser / repsol_template.yaml
Created April 12, 2024 14:13
Home Assistant / Template para sensores com valores de tarifário Repsol
# add "template: !include repsol_template.yaml" to configuration.yaml to include this
sensor:
- unique_id: repsol_spot_price_simples
unit_of_measurement: 'Cent/KWh'
availability: "{{ has_value('sensor.omie_spot_price_pt') }}"
state_class: measurement
state: >
{% set OMIE = states('sensor.omie_spot_price_pt')|float -%}
{% set Perdas = 0.15 -%}
@nosuchuser
nosuchuser / gist:5b20e0662c2596f07c94bd170a2b5dac
Created April 12, 2024 14:15
Home Assistant: Custom ApexChart Card to keep track of Repsol Indexado
# based on https://github.com/luuuis/hass_omie/wiki/ApexChartsYesterdayTodayTomorrow
type: custom:swipe-card
start_card: 2
cards:
- type: custom:apexcharts-card
update_interval: 1h
header: