Skip to content

Instantly share code, notes, and snippets.

View marcelarie's full-sized avatar
🐢
always learning

Marcel Arie marcelarie

🐢
always learning
View GitHub Profile
@JoosepAlviste
JoosepAlviste / typescript.lua
Last active April 9, 2025 09:20
Automatically add async to function declaration when typing "await"
---@param types string[] Will return the first node that matches one of these types
---@param node TSNode|nil
---@return TSNode|nil
local function find_node_ancestor(types, node)
if not node then
return nil
end
if vim.tbl_contains(types, node:type()) then
return node
@jwbee
jwbee / jq.md
Last active April 5, 2025 13:06
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is