Skip to content

Instantly share code, notes, and snippets.

View lalitmee's full-sized avatar
👨‍💻
Unmarshalling

Lalit Kumar lalitmee

👨‍💻
Unmarshalling
View GitHub Profile
@arnm
arnm / init.lua
Last active October 2, 2025 17:23
CodeCompanion Rules Chat Extension
--=============================================================================
-- CodeCompanion-Rules – manage rule files via chat.refs only
--=============================================================================
---@class CodeCompanionChatMessage
---@field content? string
---@field opts? table
---@field opts.reference? string
---@field role? string
---@field id? any
@bashbunni
bashbunni / .zshrc
Last active December 4, 2025 17:32
CLI Pomodoro for Linux (zsh)
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@sts10
sts10 / rust-command-line-utilities.markdown
Last active December 7, 2025 09:29
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@spamwax
spamwax / bubbles.lua
Created July 26, 2021 22:57
galaxyline theme
--[[
-- To get the icons working correctly:
-- 1. Install nonicons.ttf from https://github.com/yamatsum/nonicons
-- 2. Install nvim plugin https://github.com/yamatsum/nvim-nonicons
--]]
local gl = require("galaxyline")
local gls = gl.section
local fileinfo = require('galaxyline.provider_fileinfo')
local iconz = require("nvim-nonicons")
@folke
folke / lua-lsp.lua
Last active March 7, 2023 19:17
Correct sumneko lua lsp setup for init.lua and plugin development
-- put this file somewhere in your nvim config, like: ~/.config/nvim/lua/config/lua-lsp.lua
-- usage: require'lspconfig'.sumneko_lua.setup(require("config.lua-lsp"))
local library = {}
local path = vim.split(package.path, ";")
-- this is the ONLY correct way to setup your path
table.insert(path, "lua/?.lua")
table.insert(path, "lua/?/init.lua")
@romainl
romainl / diff.md
Last active December 24, 2024 10:29
:DiffOrig but smarter

:DiffOrig but smarter

This is an enhanced version of the snippet provided under :help diff-original-file.

Where the original :DiffOrig only shows differences between the buffer in memory and the file on disk, :Diff can be used in two ways:

  • against the file on disk, like the original, with:

    :Diff
    
@mikowl
mikowl / nord-vimium.css
Created July 5, 2019 19:07
Nord Vimium Theme
/* Nord Vomnibar CSS */
/* Installation: Open Vimium Options -> Click "Show Advanced Options" and paste this into the CSS for Vimium UI text area. */
#vomnibar ol, #vomnibar ul {
list-style: none;
display: none;
}
#vomnibar {
background: rgba(46, 52, 68, 0.9);
@romainl
romainl / sort.vim
Created December 31, 2018 10:30
Sort operator
function! Sort(type, ...)
'[,']sort
endfunction
nmap <silent> <key> :set opfunc=Sort<CR>g@
" usage:
" <key>ip
" <key>G
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active June 21, 2025 13:28
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

@romainl
romainl / tags.md
Last active March 16, 2025 13:28
Tags

Tags

Setup

Tell Vim to look for tags files:

  • in the directory of the current file,
  • in the working directory,
  • and in every parent directory, recursively,