Skip to content

Instantly share code, notes, and snippets.

View yarabramasta's full-sized avatar
🥐

Yara Bramasta yarabramasta

🥐
View GitHub Profile
@lambdaxyzt
lambdaxyzt / image.jsx
Last active September 18, 2024 19:34
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");
@mishushakov
mishushakov / client.tsx
Last active June 5, 2024 04:40
A React hook for calling Next.js Server Actions from client components
'use client'
import { test } from './server'
import { useServerAction } from './hook'
export default function Home() {
const { data, loading, error, execute: testAction } = useServerAction(test)
if (loading) return <div>Loading...</div>
if (error) return <div>Error: {error.message}</div>
@bayek0fsiwa
bayek0fsiwa / arch-base-to-productivity-installation-uefi.md
Last active November 9, 2022 15:40
Arch Linux Base Install on UEFI

Internet Check:

ip a

Connect to Wi-Fi at install:

iwctl
iwctl device list
iwctl station stationname scan
iwctl station stationname get-networks
iwctl station stationname connect networkname
@Akhil-Suresh
Akhil-Suresh / postman_installation.md
Last active September 23, 2024 21:30
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2