Skip to content

Instantly share code, notes, and snippets.

View tranduybau's full-sized avatar
🤩
Working is happy

Báu Trần Duy tranduybau

🤩
Working is happy
View GitHub Profile
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 9, 2025 00:04
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@Danziger
Danziger / interval.hook.ts
Last active November 22, 2025 19:58
✨ Declarative useTimeout (setTimeout), useInterval (setInterval) and useThrottledCallback (useCallback combined with setTimeout) hooks for React (in Typescript)
import React, { useEffect, useRef } from 'react';
/**
* Use setInterval with Hooks in a declarative way.
*
* @see https://stackoverflow.com/a/59274004/3723993
* @see https://overreacted.io/making-setinterval-declarative-with-react-hooks/
*/
export function useInterval(
callback: React.EffectCallback,