Skip to content

Instantly share code, notes, and snippets.

View palaniraja's full-sized avatar

palaniraja palaniraja

View GitHub Profile
@palaniraja
palaniraja / dap.lua
Last active March 18, 2025 01:25
neovim dap custom keybinding to match lldb pref
-- dap custom shortcuts
-- https://github.com/mfussenegger/dotfiles/blob/e7abb9a13f8fb3075704ed703dd973ecf3502cc3/vim/.config/nvim/lua/me/dap.lua#L64-L75
return {
{
"mfussenegger/nvim-dap",
config = function()
-- working version
local dap = require('dap')
@palaniraja
palaniraja / config.yml
Last active March 18, 2025 01:19
lazygit config.yml - my lazygit conf ('~/Library/Application Support/lazygit/config.yml')
gui:
expandFocusedSidePanel: true
git:
paging:
# colorArg: always
# pager: diff-so-fancy
pager: delta --dark --paging=never -n --syntax-theme "everforest-friendly" #-s -n --syntax-theme "1337" --diff-so-fancy --diff-highlight
# externalDiffCommand: "difft --color=always --display=inline"
# useConfig: true
@palaniraja
palaniraja / .gitconfig
Last active March 18, 2025 01:18
~/.gitconfig
[user]
name =
email =
[includeIf "gitdir:~/Desktop/src/"]
path = ~/.gitconfig-work
[includeIf "gitdir:~/Desktop/src/try/"]
path = ~/.gitconfig-personal
@palaniraja
palaniraja / options.lua
Created February 20, 2025 16:32
nvim golang ~/.config/nvim/lua/config/options.lua
-- custom config
-- Disable relativenumber
vim.opt.relativenumber = false
-- Disable line numbers in terminal buffers
vim.api.nvim_create_autocmd("TermOpen", {
pattern = "*",
callback = function()
vim.opt_local.number = false
vim.opt_local.relativenumber = false
@palaniraja
palaniraja / Makefile
Last active February 11, 2025 20:21
cgo sample
CC := clang
CXX := clang++
CFLAGS := -g -O0 -Wall -fPIC -std=c11
CXXFLAGS := -g -O0 -Wall -fPIC -std=c++17
# static .a lib
# LDFLAGS := -g
# GO_BUILD_FLAGS := -gcflags="all=-N -l" -ldflags="-extldflags '$(LDFLAGS) -lc++'"
#shared .so/.dylib
@palaniraja
palaniraja / config
Created January 2, 2025 11:29
ghostty config ~/Library/Application Support/com.mitchellh.ghostty/config
unfocused-split-opacity = 0.4
font-size = 16
window-height = 40
window-width = 100
@palaniraja
palaniraja / Default (OSX).sublime-commands
Created October 25, 2024 23:34
sublime shortcut for converting epoch seconds ~/Library/Application Support/Sublime Text/Packages/User/
[
{
"caption": "Epoch Converter",
"command": "epoch_converter"
}
]
@palaniraja
palaniraja / resource-monitor.sh
Last active October 20, 2024 19:27
poor man's resource monitor for raspberrypi home server
#!/bin/bash
# step 1: install these tools
# sudo apt install sysstat
# sudo apt install ifstat
# step 2: setup header for the files in ~/scripts
@palaniraja
palaniraja / CMakeLists.txt
Created July 7, 2024 23:36
wasm file merger
cmake_minimum_required(VERSION 3.12)
project(concat_files)
set(CMAKE_CXX_STANDARD 14)
# set(CMAKE_CXX_COMPILER em++)
add_executable(concat_files main.cpp)
set_target_properties(concat_files PROPERTIES LINK_FLAGS "\
-s WASM=1 \
@palaniraja
palaniraja / CMakeLists.txt
Created July 7, 2024 19:15
wasm file sharing between js and c
cmake_minimum_required(VERSION 3.12)
project(uppercase)
set(CMAKE_CXX_STANDARD 14)
add_executable(uppercase uppercase.cpp)
set_target_properties(uppercase PROPERTIES LINK_FLAGS "-s WASM=1 -s EXPORTED_FUNCTIONS=['_uppercase_file'] -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap','FS'] -s FORCE_FILESYSTEM=1")