Skip to content

Instantly share code, notes, and snippets.

@lambdaxyzt
lambdaxyzt / tailwind.css
Created January 13, 2024 07:27
my custome tailwind css
@font-face {
font-family: "Roboto";
src:url(...);
font-weight: bold;
}
@font-face {
font-family: "Roboto";
src:url(...);
font-weight: normal;
@lambdaxyzt
lambdaxyzt / image.jsx
Last active June 9, 2024 09:46
Remix Image Component ( use cache 'cacashe library' , stream base , sharp library )
// resource route component
import React from "react";
import { PassThrough } from "node:stream"
import fs from "node:fs"
import {createReadableStreamFromReadable} from "@remix-run/node"
import { defaultQuality,widths,mainImageReadStream,generatedImageReadstream, isThereImage,BadImageResponse } from "../../util/image.server"
export const loader = async ({ request }) => {
const url = new URL(request.url);
const src = url.searchParams.get("src");
import { useState, useRef } from "react";
function OnHoverClick(hoverChangedelay,option={}) {
//options (hover: true or false) , (click: true or false)
if (option.hover == undefined) {
option.hover = true;
}
if (option.click == undefined) {
option.click = true;
}
@lambdaxyzt
lambdaxyzt / reset.scss
Last active November 1, 2021 06:22 — forked from trey/reset.sass
Eric Meyer's reset.css in Sass. Originally by @postpostmodern.
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,