Skip to content

Instantly share code, notes, and snippets.

View ergoz's full-sized avatar
😈
let's rock

Sergio [ergoz] Escarchado ergoz

😈
let's rock
View GitHub Profile
@ergoz
ergoz / simple-adblock-powerdns.md
Created July 18, 2024 17:47 — forked from ahupowerdns/simple-adblock-powerdns.md
How to do really simple adblocking with the PowerDNS Recursor 4.x

First, clone the Mozilla focus project and make it fetch its list:

$ git clone https://github.com/mozilla/focus.git
$ cd focus
$ ./checkout.sh
$ cd Lists

This delivers several JSON formatted files, of which we are going to use disconnect-advertising.json. We'll filter out the good bits using jq, and create a Lua representation:

(
#!/bin/bash
# Removes the "You do not have a valid subscription for this server" popup message while logging in
# https://johnscs.com/remove-proxmox51-subscription-notice/
#
# Manual steps:
# cd /usr/share/javascript/proxmox-widget-toolkit
# cp proxmoxlib.js proxmoxlib.js.bak
# nano proxmoxlib.js
# search for "function(orig_cmd) {" and add "orig_cmd();" and "return;" just after it
# systemctl restart pveproxy.service
@ergoz
ergoz / reset-proxmox-cluster.sh
Created July 15, 2024 19:09 — forked from nderjung/reset-proxmox-cluster.sh
Reset proxmox cluster
#/bin/bash -xe
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
sqlite3 /var/lib/pve-cluster/config.db "delete from tree where name = 'corosync.conf';"
@ergoz
ergoz / .zshrc
Created July 4, 2024 15:41 — forked from fcaldera/.zshrc
zsh configuration with zplug
export ZPLUG_HOME=/usr/local/opt/zplug
# Essential
source $ZPLUG_HOME/init.zsh
# Async for zsh, used by pure
zplug "mafredri/zsh-async", from:github, defer:0
# oh-my-zsh
zplug "lib/completion", from:oh-my-zsh
blueprint:
name: Notifications & Announcements
description: >
# πŸ“’ Notifications & Announcements
**Version: 1.0**
State your trigger and spread the word πŸ’¬ πŸ”‰
@ergoz
ergoz / renew_ssl_cert.yaml
Created June 17, 2024 16:56 — forked from TJ-developer/renew_ssl_cert.yaml
Homeassistant Blueprint for SSL-Certificate renewal
blueprint:
name: Renew Let's Encrypt Certificate
description: Renew Certificate when due date is below given value
domain: automation
input:
cert_expiry_sensor:
name: Certificate Expiry Sensor
description: Sensor from the Certificate Expiry Integration (https://www.home-assistant.io/integrations/cert_expiry)
selector:
entity:
blueprint:
name: Calendar Notifications & Actions
description: >
# πŸ“… Calendar Notifications & Actions
**Version: 1.5**
Transform Your Calendar: Turn Events Into Notifications and Actions! πŸ“…πŸ””βš™οΈ
@ergoz
ergoz / appliance-notifications.yaml
Created June 17, 2024 16:51 — forked from Blackshome/appliance-notifications.yaml
appliance-notifications.yaml
blueprint:
name: Appliance Notifications & Actions
description: >
# πŸ“³ Appliance Notifications & Actions
**Version: 2.2**
πŸ€” Watts your appliance up to, you're always in the know from start to finish!πŸ›ŽοΈπŸ”ŒπŸ’Έ
blueprint:
name: Low Battery Notifications & Actions
description: >
# πŸͺ« Low Battery Notifications & Actions
**Version: 2.3**
πŸš€ Stay Charged, Stay Smart! Let's automate and take charge of your battery maintenance!πŸ”‹βš‘
blueprint:
name: Bathroom Humidity Exhaust Fan
description: >
# 🚿 Bathroom Humidity Exhaust Fan
**Version: 2.4**
Step into the future of freshness - customize it your way and let the automated fan system handle the humidity control for you! 🌿🚿