Skip to content

Instantly share code, notes, and snippets.

@gquittet
gquittet / tailwind-gauge-chart.html
Last active November 22, 2025 23:36
tailwind gauge chart
<!-- percent to deg => Math.round(((value / 100) * 180 - 45) * 10) / 10 -->
<div class="relative flex aspect-[2] items-center justify-center overflow-hidden rounded-t-full bg-blue-400">
<div class="absolute top-0 aspect-square w-full rotate-[calc(72deg-45deg)] bg-gradient-to-tr from-transparent from-50% to-white to-50% transition-transform duration-500"></div>
<div class="absolute top-1/4 flex aspect-square w-3/4 justify-center rounded-full bg-blue-100"></div>
<div class="absolute bottom-0 w-full truncate text-center text-[20vmax] leading-none">40%</div>
</div>
@martinlipp
martinlipp / EntityManagerConfiguration.php
Last active April 29, 2022 07:31
Add custom Doctrine query hints in Neos Flow
<?php
namespace Acme\Demo\Persistence\Doctrine;
use Doctrine\DBAL\DBALException;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Query;
use Gedmo\Translatable\Query\TreeWalker\TranslationWalker;
use Gedmo\Translatable\TranslatableListener;
@adshrc
adshrc / README.txt
Last active February 12, 2026 06:53
Cloudflare Maintenance Page - Simple Cloudflare Worker
Easy to use Maintenance page as a Cloudflare Worker. Once set up, you can enable it for unlimited pages in your CF account. Get rid of greedy subscriptions that charge you per domain.
How to:
1. Go to Cloudflare Workers and create a new Worker (url is https://dash.cloudflare.com/<your-id>/workers/new)
2. paste the Code from above
3. Set an AUTH_KEY and AUTH_VALUE and the maintenancePageHtml (optionally)
4. deploy the worker
5. goto Cloudflare and choose a domain, click on the Workers section (url is https://dash.cloudflare.com/<your-id>/<domain>/workers)
6. click on "Add Route" and set the Route you want to enable the maintenance page for (typically <domain>/*)
7. choose your previously created worker from the dropdown
@CarlosEduardo
CarlosEduardo / Doctrine-Multi-Tenancy.md
Last active June 19, 2024 14:36
Multi-Tenancy (tenant) Strategy for Doctrine ORM