Skip to content

Instantly share code, notes, and snippets.

View hasan-py's full-sized avatar

Hasan hasan-py

View GitHub Profile
@KristofferEriksson
KristofferEriksson / useLongPress.ts
Created January 24, 2024 11:05
A simple useLongPress hook for React
import { useCallback, useEffect, useRef } from "react";
export function useLongPress({
delay,
onLongPress,
onClick,
onCancel,
onFinish,
onStart,
}: {
@natew
natew / tamagui_example_themebuilder_themes.ts
Last active October 2, 2025 12:40
Code showing Tamagui ThemeBuilder generating the site theme suite
import {
blue,
blueDark,
gray,
grayDark,
green,
greenDark,
orange,
orangeDark,
pink,
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active October 21, 2025 13:01
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings