Skip to content

Instantly share code, notes, and snippets.

View DrKJeff16's full-sized avatar
πŸ‡²πŸ‡½
Doing my best

Guennadi Maximov C DrKJeff16

πŸ‡²πŸ‡½
Doing my best
View GitHub Profile
@DrKJeff16
DrKJeff16 / build_nvim.sh
Last active October 3, 2025 05:55
`build_nvim.sh`: A boring Neovim build bash script
#!/usr/bin/env bash
OPTS=':hxXvfpc:g:s:C:B:'
CLEAN=0
CLEANED=0
FORCE=0
POST_HOOK=0
VERBOSE=0
@cseeman
cseeman / markdown_examples.md
Last active December 5, 2025 03:47
Markdown for info panel/warning box

Examples for how to create your own info panel, warning box and other decent looking notification in GitHub markdown.

All the boxes are single/two cell tables or two row tables.

Warning box

❗ You have to read about this

A metatable in Lua defines various extraneous behaviors for a table when indexed, modified, interacted with, etc. They are Lua's core metaprogramming feature; most well known for being useful to emulate classes much like an OOP language.

Any table (and userdata) may be assigned a metatable. You can define a metatable for a table as such:

-- Our sample table
local tab = {}
-- Our metatable
local metatable = {
 -- This table is then what holds the metamethods or metafields
@leodutra
leodutra / git-no-ff.sh
Created September 13, 2017 18:36
Git always merge with --no-ff (non fast-foward)
#!/bin/sh
git config --global merge.ff no
git config --global merge.commit no
# However, the problem with this is that git pull = git fetch + git merge.
# So whenever you pull from the remote server,
# you'd be creating an ugly merge commit when
# a simple fast-forward would be warranted.
# To solve this, set pull.ff to yes:
git config --global pull.ff yes