Skip to content

Instantly share code, notes, and snippets.

View DeeprajPandey's full-sized avatar

Deepraj Pandey DeeprajPandey

View GitHub Profile
@DeeprajPandey
DeeprajPandey / Git Conventional Commit Hook - README.md
Last active March 27, 2025 18:04
Bash-based Conventional Commit Hook: A lightweight, dependency-free git hook for enforcing Conventional Commits format. Features intelligent suggestions, breaking change support, and body/footer validation.

Git Conventional Commit Hook

A lightweight, zero-dependency Git hook that enforces the Conventional Commits format across all your repositories.

What is it?

This tool enforces consistent commit messages following the Conventional Commits specification. It runs as a Git commit-msg hook with:

  • Zero Dependencies: Pure Bash implementation - works everywhere Git does (No Node.js, Python, or external dependencies)
  • Global Installation: Works across all repositories automatically
@effinsky
effinsky / gleam.lua
Last active October 7, 2024 16:20
condensed gleam setup for neovim
local capabilities = vim.lsp.protocol.make_client_capabilities()
local on_attach = require("user.lsp.handlers").on_attach
local on_attach = function(client)
if client.name == "gleam" then
client.server_capabilities.documentFormattingProvider = true
end
-- lsp_keymaps() loads my lsp handler keymaps, not gleam specific and you should
-- have this handled somehow if other lsp work for you
lsp_keymaps()
@chabala
chabala / using-google-takeout.md
Last active April 19, 2025 08:33
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
@zjeaton
zjeaton / __Magnific Image Modal for Hugo.md
Last active March 13, 2025 09:45
Magnific Image Modal Pop-up for Hugo

Magnific Image Pop-Up Modal for Hugo

A working demo of the pop-up can be found here.

I wanted a modal pop-up for images on my new Hugo site, and couldn't find one that worked with the styling that I do to the image path name. I'm new to Hugo, but I feel that the solution is simple and effective. The close button has been optimzed for accessibility as it is named close, but displays only × (×).

File Placement

@arogulin
arogulin / VortexRace3ForMac.md
Last active March 19, 2025 12:19
How to setup Vortex Race 3 keyboard for Mac and move Fn key to Home

How to setup Vortex Race 3 for Mac with latest (on 2020-01-05) firmare V1.02.05.

For better understanding we will use the following naming convention:

  [ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
  1. Reset everything by pressing L3+R1 for 5 seconds. Left LED will blink white color while you're holding the keys. Release them after it stopeed blinking.
  2. Get into one of the programmable layers (R2+RShift) – I like red, the super bright laser LED is the least super annoying in red.
  3. Put the keyboard in Windows Mode (Pn+W), it's the least problematic one.
@rjeczalik
rjeczalik / how-to-find-forks-of-deleted-repo.md
Created August 26, 2019 16:39
How to find forks of a deleted repository?

Fixing macOS 10.14, 10.15, 12

Dark main menu without the rest of dark mode

  1. Set Light mode
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. Log out and log back in
  4. Set Dark mode
@romainl
romainl / colorscheme-override.md
Last active March 8, 2025 21:23
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
@nifl
nifl / grok_vi.mdown
Created August 29, 2011 17:23
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)