Skip to content

Instantly share code, notes, and snippets.

View alexdelprete's full-sized avatar

Alessandro Del Prete alexdelprete

View GitHub Profile
@alexdelprete
alexdelprete / opnsense-vpn.cfg
Created January 10, 2024 03:18 — forked from smilzo/opnsense-vpn.cfg
Fritzbox VPN configuration with OPNSense
// This configuration is not mine but found on a german forum, and modified for my needs. I'm sharing because all info are in german
// Comment about a more secure VPN cfg are welcome, this is mere cut and past because testing is slow
//
// On the OPNSense side, configure the IPSEC tunnel in this way
// Tunnel Setting:
//
// - Connection method: I've put "Respond only" because the OPNSense is installed on stable server
// - Key Exchange version: V1
// - Internet Protocol: IPv4
// - Interface: WAN
@alexdelprete
alexdelprete / nuki_hub_mushroom.yaml
Created March 11, 2023 22:41
Nuki Hub Mushroom Card
type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
layout: horizontal
primary: >
{% set lock_name = state_attr('lock.portoncino','friendly_name') %} {% set
trigger = states('sensor.portoncino_trigger') %} {% if
is_state('lock.portoncino','unlocked') and
is_state('binary_sensor.portoncino_door_sensor','off') %}
{{ lock_name }}: closed & unlocked by {{ trigger }}
@alexdelprete
alexdelprete / Raspberry Pi 4 Arm64 Kernel Cross-Compile.md
Created November 2, 2022 11:20 — forked from G-UK/Raspberry Pi 4 Arm64 Kernel Cross-Compile.md
Building the Raspberry Pi 4 Arm64 Linux Kernel

The Raspberry Pi foundation have now released a beta version of an official 64-bit Kernel which can be installed using the rpi-update script. The rpi-update script can be found at https://github.com/Hexxeh/rpi-update/blob/master/rpi-update or through the Raspbian repositories

Introduction

The objective of these instructions is to build a stock 64bit Linux Kernel for use on the Raspberry Pi 4B on a Debian x64 machine (Windows Subsystem for Linux in my case), and deploy on the Raspberry Pi.

Notes:

  • Transfer to Pi is using my NAS in this example, replace with shared drive/memory stick etc. as required.
    • (N: drive on Windows and /mnt/NAS on Linux in this example).
  • For a specific Kernel version replace the 4.19 with the wanted version in the git clone command.
  • Greater than 3GB RAM only currently available on Kernel 4.19
@alexdelprete
alexdelprete / inst_dotfiles.sh
Last active March 19, 2024 00:27
Dotfiles Installation
#!/bin/bash
clear
echo_task() {
printf "\033[0;34m--> %s\033[0m\n" "$*"
}
error() {
printf "\033[0;31m%s\033[0m\n" "$*" >&2
exit 1
@alexdelprete
alexdelprete / free_ports.sh
Last active December 15, 2021 00:19 — forked from hjbotha/free_ports.sh
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
# Run this script as root
@alexdelprete
alexdelprete / nuki_card_callback.yaml
Last active October 14, 2022 17:46
Nuki Card v11.0
######################################
# #
# -= Nuki Card v11.0 =- #
# #
# by #
# @alexdelprete #
# #
# contributions from: #
# @spokin #
# #
@alexdelprete
alexdelprete / WF Tempest Node-Red Flow (HA+MQTT).json
Created May 3, 2021 15:19
WF Tempest Node-Red Flow (HA+MQTT)
[
{
"id": "7725e362.54641c",
"type": "tab",
"label": "WeatherFlow Tempest (HA+MQTT) ",
"disabled": false,
"info": ""
},
{
"id": "e4e51e81.61592",