Skip to content

Instantly share code, notes, and snippets.

@wizhippo
wizhippo / AutocompleteEntityFilter.php
Last active February 25, 2025 20:07
Start of adding autocomplete support to EntityFilter
<?php
namespace App\EasyAdmin\Filter;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Mapping\MappingException;
use Doctrine\ORM\Query\Expr\Orx;
use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Filter\FilterInterface;
<?php
namespace App\EasyAdmin\Filter;
use Doctrine\ORM\Query\Expr\Orx;
use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Filter\FilterInterface;
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\FilterDataDto;
<article class="view-type view-type-{{ view_type }} {{ content.contentType.identifier|replace({'_': '-'}) }}">
<div class="title file mime-type-{{ content.getField('file').value.mimeType|replace({'/': '-'})|replace({'.': '-'}) }}">
{{ ez_render_field(content, 'file') }}
</div>
<div class="info">
{{ content.contentType.name }}
</div>
</article>
<?php
namespace EasyCorp\Bundle\EasyAdminBundle\Field;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\EaFormPanelType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\EaFormRowType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\EasyAdminTabType;
use Symfony\Component\Uid\Ulid;
@wizhippo
wizhippo / notes.md
Last active June 29, 2025 13:28
pilot quick calc

Desent

Rate of descent standard 3deg

Ground speed * 5 or Ground speed / 2 add zero

Examples:

200 * 5 = 1000fpm

or 200 / 2 = 100 * 10 = 1000fpm

@wizhippo
wizhippo / quadrature_encoder.pio
Created August 3, 2023 20:25
pi pico quad with set counter
;
; Copyright (c) 2023 Raspberry Pi (Trading) Ltd.
;
; SPDX-License-Identifier: BSD-3-Clause
;
.program quadrature_encoder
; the code must be loaded at address 0, because it uses computed jumps
.origin 0

How to update IP addressing on a Proxmox Cluster

When you change something in your network configuration, rather than its the gateway or the IP addressing, you may come under serious troubleshooting on your Proxmox Cluster, so this document will guide you into the necessary steps needed to update your network settings on Proxmox.

Note : You must follow these steps on every single node of your cluster to let it able to handle the synchronization between each node once.

So firstly, you will need to change the network interface configuration of the system; it is preferable for you to set a static IP:

/etc/network/interfaces