Skip to content

Instantly share code, notes, and snippets.

Learning the sh*t out of things

Noud Adrichem noudadrichem

Learning the sh*t out of things
View GitHub Profile
View useDebounceCallback.ts
/* eslint-disable @typescript-eslint/no-explicit-any */
import { useRef, useCallback, useEffect } from 'react';
export default function useDebouncedCallback<T extends (...args: any[]) => any>(
callback: T,
delay: number,
options: { maxWait?: number; leading?: boolean; trailing?: boolean } = {},
): [T, () => void, () => void] {
const maxWait = options.maxWait;
const maxWaitHandler = useRef<NodeJS.Timeout | null>(null);
dabroder /
Created Jun 6, 2018
Install i3-gaps on ubuntu 18.04
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake
cd /tmp
# clone the repository
git clone i3-gaps
cd i3-gaps
# compile & install
subfuzion /
Last active Jun 17, 2021
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.