Skip to content

Instantly share code, notes, and snippets.

@dikaio
dikaio / page.tsx
Created December 13, 2023 08:58
Loading Videos on Vercel via Mix
import { preload } from "react-dom";
import { unstable_getImgProps as getImgProps } from "next/image";
type Props = {
playbackId: string;
loading: "lazy" | "eager";
resolution: "SD" | "HD";
};
export default function MuxVideo({ playBackId, loading, loading }: Props) {
@dikaio
dikaio / box-shadow.md
Created December 20, 2023 05:29
Realistic Box Shadows

Realistic CSS Shadows

box-shadow: x, y, blur, spread, color

Alpha 5%

box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05)
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05)
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05)
@dikaio
dikaio / README.md
Created January 6, 2024 15:23
Simple script to optimize images quality, size and format.

How to use

  1. Update the sizes and final format you want your images formatted to in source.
  2. make the script executable chmod +x optimize.sh
  3. run the script ./optimize.sh original.jpg
@dikaio
dikaio / country-dial-codes.json
Last active July 28, 2024 16:33
Country Dial Codes
[
{
"name": "Afghanistan",
"code": "AF",
"emoji": "🇦🇫",
"image": "https://cdn.jsdelivr.net/gh/lipis/[email protected]/flags/4x3/af.svg",
"dialCodes": [
"+93"
],
"slug": "afghanistan"
@dikaio
dikaio / settings.json
Last active March 19, 2025 08:47
Visual Studio Code Settings
{
"breadcrumbs.enabled": true,
"colorInfo.languages": [
{
"selector": "css",
"colors": "css"
},
{
"selector": "sass",
"colors": "css"
@dikaio
dikaio / continents.csv
Last active April 9, 2025 02:38
Continent > Country > Region > City
id name slug
1 Africa africa
2 Americas americas
3 Antarctica antarctica
4 Asia asia
5 Europe europe
6 Oceania oceania