Skip to content

Instantly share code, notes, and snippets.

View goldie-lin's full-sized avatar

Goldie Lin goldie-lin

  • Puli, Taiwan
  • 00:07 (UTC +08:00)
View GitHub Profile
@OXY2DEV
OXY2DEV / fancy_lsp_hover.md
Last active November 8, 2025 09:30
A slightly fancier LSP hover for Neovim

✏️ Overview

Note

A more bleeding-edge version of this is available here.

A pretty simple custom LSP hover window that tries to solve the issues I face with the built-in one.

showcase_1 showcase_2

@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active March 2, 2026 04:47
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
@thesamesam
thesamesam / xz-backdoor.md
Last active March 9, 2026 22:51
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@heinermann
heinermann / d2rcmdline
Last active March 8, 2026 15:51
D2R Command Line Options
-w, -window, -windowed Run in windowed mode.
-per ??
-lq Runs game using low quality/low vision mode; same as Large Font Mode setting.
-gamma <num> Override Gamma. Default: 0
-vsync <num> Override VSync. Default: 255
-aftermath <string> ?? 23 chars max. Default: unset
-s <string> ?? 23 chars max. Default: unset
-gametype <num> ?? Default: 0
-arena <num> ?? Default: 0
-joinid <num> ?? Default: 1
@Strus
Strus / clangd.md
Last active February 18, 2026 20:04
How to use clangd C/C++ LSP in any project

How to use clangd C/C++ LSP in any project

tl;dr: If you want to just know the method, skip to How to section

Clangd is a state-of-the-art C/C++ LSP that can be used in every popular text editors like Neovim, Emacs or VS Code. Even CLion uses clangd under the hood. Unfortunately, clangd requires compile_commands.json to work, and the easiest way to painlessly generate it is to use CMake.

For simple projects you can try to use Bear - it will capture compile commands and generate compile_commands.json. Although I could never make it work in big projects with custom or complicated build systems.

But what if I tell you you can quickly hack your way around that, and generate compile_commands.json for any project, no matter how compilcated? I have used that way at work for years, originaly because I used CLion which supported only CMake projects - but now I use that method succesfully with clangd and Neovim.

@t-wy
t-wy / fb_post_id_script.js
Created November 28, 2022 12:22
Get Facebook canonical Post ID (share URL) without pfbid parameter
javascript: fbid = /share_fbid":"(\d+)"/g.exec([...document.getElementsByTagName("script")].filter(x => x.innerHTML.includes("share_fbid"))[0].innerHTML)[1]; alert(location.href.split("/").slice(0, -1).join("/") + "/" + fbid);
// can be used in console / bookmark / address bar (remember to add back javascript if the browser strips it automatically)
@christianparpart
christianparpart / terminal-synchronized-output.md
Last active January 31, 2026 03:50
Terminal Spec: Synchronized Output

This page has moved!

Please see here: contour-terminal/vt-extensions

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

@ojroques
ojroques / 52-osc
Created January 17, 2021 11:54
Enable support of OSC52 for urxvt

NAME

52-osc - Implement OSC 52 ; Interact with X11 clipboard

SYNOPSIS

urxvt -pe 52-osc
#!/usr/bin/env python3
# Copyright (c) 2018 Foundries.io
#
# SPDX-License-Identifier: Apache-2.0
import argparse
from collections import namedtuple
import struct