Skip to content

Instantly share code, notes, and snippets.

View davidino's full-sized avatar

David Funaro davidino

  • AWS
  • Dublin
  • 15:49 (UTC)
View GitHub Profile
@davidino
davidino / README.MD
Last active July 25, 2025 08:45
Integration HA Spoolman

Spoolman Filament Auto-Updater

Purpose

The scripts and configurations provided here are designed to automatically update the remaining filament in Spoolman when a print is completed. This integration enhances the filament tracking experience by linking your 3D printing setup with Spoolman.

Instructions

1. Install Required Dependencies

@davidino
davidino / script.yaml
Created April 8, 2025 20:57
Bin reminder
alias: Garbage bin reminder
description: ""
mode: single
triggers:
- alias: it's 8pm
at: "19:35:00"
enabled: true
trigger: time
- entity_id: zone.home
attribute: persons
@davidino
davidino / NPM-plugin-error.md
Last active March 24, 2025 23:15
nginx-proxy-manager plugin not install issue

Some plugins failed to install - Resolved

Issue

The main issue was that the container could not connect to any external services using HTTPS/SSL, which prevented it from downloading required dependencies during the bootstrap process. This resulted in the following error logs:

app-1  | [3/24/2025] [10:21:16 PM] [Certbot  ] › ▶  start     Installing cloudflare...
app-1  | [3/24/2025] [10:21:16 PM] [Global   ] › ⬤  debug     CMD: . /opt/certbot/bin/activate && pip install --no-cache-dir cloudflare==2.19.* acme==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') certbot-dns-cloudflare==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+')  && deactivate
app-1  | [3/24/2025] [10:23:01 PM] [Certbot  ] › ✖  error     WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/certbot-dns-cloudflare/
app-1  | WARNING: Retrying (Retry(total=
alias: Garbage bin reminder
description: ""
trigger:
- platform: time
at: "18:00:00"
condition:
- condition: time
before: "00:00:00"
weekday:
- wed
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<title>Dee Notte</title>
<link><![CDATA[http://www.deejay.it/audio/podcast/dee-notte/]]></link>
<description><![CDATA[Nicola Vitiello e Gianluca Vitiello ti aspettano in diretta Dee Notte!! In podcast riascolta il meglio dei loro programmi.]]></description>
<language>it-it</language>
<copyright>Copyright Elemedia S.p.A. 1999-2018</copyright>
<managingEditor>[email protected] (Radio Deejay)</managingEditor>
<itunes:author>Radio Deejay</itunes:author>
function generateBC(url, separator) {
var elements = url.split('/')
elements.reduce((acc, value, index) => {
return index === 0 ?
generateTag('/', 'home', false) :
generateTag(`/${value}/`, value, index == elements.length -1 ? true: false)
},'')
}
function generateTag(href, name, active) {
function LCS(x, y) {
if (x.length == 0 | y.length == 0)
return '';
var res = []
x = x.split('');
y = y.split('');
y.forEach((ago, i) => {
x.forEach((pag, j) => {
@davidino
davidino / test.md
Last active December 21, 2016 15:26
shrink the vm

Problem

The vm is continuously growing. Even when you free space ( from inside ) then the virtual disk will not change the size:

Solution

Inside the VM run that command:

cd ~
sudo cat /dev/zero > zero;sync;sleep 1;sudo rm zero
@davidino
davidino / description.md
Last active February 25, 2016 08:07
docker-security-1.10

Docker security improvement - Username Space

As you already know Docker released the 1.10 version with a huge list of features. The list contains also a list of security improvment: one of that is the improving the user namespace

This is what it was happening before the version 1.10. We are just runnging an alpine container mounting an external volume /var/log/. :: include no-usernamespece.rd As you can see the ownership of the files in the container it is exactly the one outside the container ( because we are mounting the volume ). That means that the actual logget user in the container (root) can have access to these files and for example mess the up.

@davidino
davidino / vm.sh
Last active August 29, 2015 14:25 — forked from unlucio/vm.sh
simple vm management script
#!/bin/sh
if [ -z "$vmFile" ]
then
echo "please set your 'vmFile' environment variable to point to your vm's .vmx file"
exit 1
fi
case "$1" in
start)