Skip to content

Instantly share code, notes, and snippets.

View i-am-henri's full-sized avatar

henri i-am-henri

View GitHub Profile
@frstycodes
frstycodes / settings.json
Last active January 7, 2025 04:00
VS Code settings for Miniamal Look
/* Make sure to add following extensions:
****************************************
* 1. APC Customization UI++
* 2. Symbols Icon Theme
* 3. AbelFubu theme -> AbelFubu Contrast variant *Note: theme is only for syntax highlighting, ui colors are included in this file.
* 4. Make sure to change a few settings like font, font size to your liking.
****************************************
*/
{
@KristofferEriksson
KristofferEriksson / useShare.ts
Created February 7, 2024 22:19
A React Typescript hook that let users share your content directly via native share dialogs
import { useCallback, useEffect, useState } from "react";
// Types for the useShare hook parameters
interface UseShareParams {
onShare?: (content: ShareParams) => void;
onSuccess?: (content: ShareParams) => void;
onError?: (error: any) => void;
fallback?: () => void;
successTimeout?: number;
}
@KristofferEriksson
KristofferEriksson / useKeypress.ts
Last active March 24, 2025 14:38
A React custom hook for handling keyboard events.
import { useEffect } from "react";
const Keys = {
Backspace: "Backspace",
Tab: "Tab",
Enter: "Enter",
Shift: "Shift",
Control: "Control",
Alt: "Alt",
Pause: "Pause",