Skip to content

Instantly share code, notes, and snippets.

View babul's full-sized avatar

Babul A. Mukherjee babul

View GitHub Profile
@babul
babul / LightboxImage.astro
Created October 4, 2024 22:09
a single file component to provide Lightbox capability for a single image, pass in an imported Image
---
import type { ImageMetadata } from 'astro'; // Use type-only import
import { Image } from 'astro:assets';
interface Props {
id: string; // must be unique
src: ImageMetadata;
alt: string;
height: number;
width: number;
@babul
babul / reboot-prep.sh
Last active July 7, 2020 10:14
Ubuntu reboot when required
cd ~/
curl https://gist.githubusercontent.com/babul/a4836d50951738c7ea3396ad504727b7/raw/7d0c68c1393813440c8bf816d2ccec2454f59d72/reboot-when-required --output reboot-when-required
chmod +x reboot-when-required
grep 'reboot-when-required' /etc/crontab || echo '0 5 * * * ~/reboot-when-required' >> /etc/crontab