Skip to content

Instantly share code, notes, and snippets.

@Kurama622
Kurama622 / xephyr.sh
Created May 13, 2025 16:02
Xephyr debug wm
#!/bin/bash
Xephyr -fullscreen -noreset :1 &
sleep 1
export DISPLAY=:1
# set dpi
xrdb -merge ~/.Xresources
exec dwm 2>/dev/null
@Kurama622
Kurama622 / function_calling.lua
Last active May 13, 2025 15:39
Function Calling in Neovim
local Job = require("plenary.job")
local json = vim.fn.json_encode
local function add(a, b)
print("a + b = ", a + b)
return a + b
end
local function Multiplication(a, b)
print("a * b = ", a * b)
return a * b
@Kurama622
Kurama622 / Makefile
Created June 5, 2024 08:46 — forked from ochinchina/Makefile
implement barrier with the zookeeper C API, require C++11 compiler
CPP = g++
INCS = -I$(ZK_DIR)/src/c/include -I$(ZK_DIR)/src/c/generated
LIBS = -L$(ZK_DIR)/src/c/.libs -lzookeeper_mt -lpthread
CXX_FLAGS = -std=c++11
all: barrier
barrier: ZkBarrierTest.o
$(CPP) -o barrier ZkBarrierTest.o $(LIBS)