Skip to content

Instantly share code, notes, and snippets.

@runiq
runiq / README.md
Last active July 9, 2024 15:35
Neovim throttle & debounce

What are these?

Functions that allow you to call a function not more than once in a given timeframe.

Throttling on the leading edge

This can be illustrated with timing diagrams. In the following diagrams, f designates call to the throttled function, t is the period where the timer is running, and x shows you the actual execution point of the throttled function.

f 1  2  3  4  5  6
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active July 17, 2025 04:45
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@adzialocha
adzialocha / hyg-database-converter.py
Last active April 2, 2018 10:41
Convert HYG Database of stars into json file
import argparse
import csv
import json
import os
import urllib
def is_float(x):
try:
a = float(x)
except ValueError:
@mrbar42
mrbar42 / README.md
Last active July 30, 2025 03:07
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8