Skip to content

Instantly share code, notes, and snippets.

View BinarySenseiii's full-sized avatar

Faisal TariQ BinarySenseiii

View GitHub Profile
@BinarySenseiii
BinarySenseiii / README.md
Created January 24, 2025 07:27 — forked from Lelectrolux/README.md
Tailwindcss breakpoint inspector, initial idea from https://gist.github.com/jonsugar/6bce22bd7d3673294caad36046c2b7cb

Tailwindcss plugin that adds a small box in the lower right corner of the screen showing the current breakpoint

Uses a position: fixed after css pseudo element on the body, so no extra markeup, and it get the breakpoint list by itself.

Inspect an Elusive Element
Let’s say you want to inspect a DOM element that only conditionally appears. Inspecting said element requires moving your mouse to it, but when you try to, it disappears:
setTimeout(function() { debugger; }, 5000);
@BinarySenseiii
BinarySenseiii / createCrudHooks.js
Created February 9, 2023 11:24 — forked from tannerlinsley/createCrudHooks.js
A naive, but efficient starter to generate crud hooks for React Query
export default function createCrudHooks({
baseKey,
indexFn,
singleFn,
createFn,
updateFn,
deleteFn,
}) {
const useIndex = (config) => useQuery([baseKey], indexFn, config)
const useSingle = (id, config) =>