Skip to content

Instantly share code, notes, and snippets.

View tfpf's full-sized avatar
🙂

Vishal Pankaj Chandratreya tfpf

🙂
  • India
  • 03:06 (UTC +05:30)
View GitHub Profile
@tfpf
tfpf / README_pysorteddict_coverage.md
Last active July 20, 2025 15:25
pysorteddict Coverage

pysorteddict Coverage

Stores the coverage report of the functional tests of pysorteddict. Used to display a coverage badge in README.md.

@tfpf
tfpf / words_change_nothing.md
Created June 29, 2025 09:00
Words change nothing

Words change nothing. Only actions do.

You heard it here first, folks.

@tfpf
tfpf / override_monospace_fonts_on_a_webpage.md
Last active April 23, 2025 15:42
Font customisation hack

Override Monospace Fonts on a Webpage

Using a Browser Plugin

Add a browser plugin which will run custom JavaScript code after loading any page. Paste this code in it.

setInterval(function () {
  Array.prototype.forEach.call(
    document.getElementsByTagName('*'),
@tfpf
tfpf / README_go_bash_completions.md
Last active March 9, 2024 13:30
Programmable Bash Completions for use with Go commands

go Bash Completions

Bash completions for go have already been written by others: of note are posener/complete and spf13/cobra. Those are written in Go, however, and I (as someone new to Go) had absolutely no clue how to install and use them!

  • posener/complete, at the time of writing this, has an obsolete branch as the default. The up-to-date branch has instructions to install the completions, but those are wrong. (They don't work.)
  • spf13/cobra probably has completions somewhere, perhaps in bash_completions.go in the repository root at the time of writing this, but there is no information on how to use it in README.md or in that file.

I just wanted a simple Bash script which I could simply put into my completions directory. So, I wrote this script! It isn't perfect, but it should cover most use cases. If someone wants to dabble into the more obtuse