Skip to content

Instantly share code, notes, and snippets.

View sivasiva's full-sized avatar

Siva Sivakumar sivasiva

View GitHub Profile
#!/usr/bin/env bash
input=$(cat)
model=$(echo "$input" | jq -r '.model.display_name // "Unknown Model"')
total_input=$(echo "$input" | jq -r '.context_window.current_usage.input_tokens // 0')
total_output=$(echo "$input" | jq -r '.context_window.current_usage.output_tokens // 0')
tokens_used=$((total_input + total_output))
context_window_size=$(echo "$input" | jq -r '.context_window.context_window_size // 0')
@sivasiva
sivasiva / gist:7be2ece5e04e0af0ebc26f5a4cbcc9d8
Created July 8, 2024 21:41
Working minimal Elixir / Phoenix + Elixir LSP + Tailwind LSP neovim config - based on https://github.com/nvim-lua/kickstart.nvim
--[[
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
======== .-----. ========
======== .----------------------. | === | ========
======== |.-""""""""""""""""""-.| |-----| ========
======== || || | === | ========
======== || KICKSTART.NVIM || |-----| ========