Skip to content

Instantly share code, notes, and snippets.

@justpiple
justpiple / paginationControls.tsx
Last active January 27, 2025 21:07
A responsive pagination component that adjusts its layout and displayed pages based on the current screen width and total number of pages.
"use client";
import { Button } from "@/components/ui/button";
import { useEffect, useState } from "react";
import {
ChevronFirst,
ChevronLast,
ChevronLeft,
ChevronRight,
} from "lucide-react";
@rela589n
rela589n / source.php
Last active April 9, 2025 15:52
Symfony Doctrine Type Dependency Injection
// Doctrine Type
final class YourCustomType extends Type
{
public const NAME = 'your_custom_type';
private YourCustomService $yourCustomService;
public function setYourCustomService(YourCustomService $yourCustomService): void
{
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table