Skip to content

Instantly share code, notes, and snippets.

View kuntau's full-sized avatar
💭
I may be slow to respond.

Nizamuddin Sulieman kuntau

💭
I may be slow to respond.
View GitHub Profile
@revolucas
revolucas / print_table.lua
Last active June 26, 2026 22:29
[Lua] Print table function for deeply nested tables
--[[
Most pure lua print table functions I've seen have a problem with deep recursion and tend to cause a stack overflow when
going too deep. This print table function that I've written does not have this problem. It should also be capable of handling
really large tables due to the way it handles concatenation. In my personal usage of this function, it outputted 63k lines to
file in about a second.
The output also keeps lua syntax and the script can easily be modified for simple persistent storage by writing the output to
file if modified to allow only number, boolean, string and table data types to be formatted.
author: Alundaio (aka Revolucas)
@bbqtd
bbqtd / macos-tmux-256color.md
Last active August 16, 2026 06:05
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@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
@naruaway
naruaway / filetype-detection-in-different-ecosystems.md
Last active January 8, 2022 07:01
Filetype detection in different ecosystems

Filetype detection in different ecosystems

The concept of "file type" is important. For example, a text editor wants to figure out whether the current open file is written in Python or TypeScript to provide file type specific features including something like syntax highlighting.

Many editors / tools are using short identifier to distinguish file types (e.g. javascript, typescriptreact, zsh, python). For example, (probably) the most popular open source text editor, VS Code has a list of "known language identifiers" and closely related, LSP spec is also mentioning "common language identifier". Since VS Code and LSP are popular, I think these language identifiers are considered kind of "standard" and other editors tend to follow them (e.g. [Vim/Neovim is using "typescriptreact" for ".tsx" files](https://