1: https://gist.github.com/adewes/c9b2a71457c6c6f01f2f
2: https://gist.github.com/adewes/02e8a1f662d100a7ed80627801d0a...
3: https://gist.github.com/adewes/7a4c20a5a7379e19d78ba54521d3d...
1–10 of 340 posts
1: https://gist.github.com/adewes/c9b2a71457c6c6f01f2f
2: https://gist.github.com/adewes/02e8a1f662d100a7ed80627801d0a...
3: https://gist.github.com/adewes/7a4c20a5a7379e19d78ba54521d3d...
mkdir ~/.marks/
export CDPATH=.:~/.marks/
function mark { ln -sr "$(pwd)" ~/.marks/"$1"; }
Then: mark @name # add bookmark called @name for the current directory
cd @name # jump to the bookmarked location
cd @ # list all available bookmarks
It can list bookmarks, auto-complete, jump to sub-directories within bookmarks, all without introducing any new commands - just `cd`.[1]: http://karolis.koncevicius.lt/posts/fast_navigation_in_the_c...
The solution is a simple bash script that deletes "target/" directories.
But I started accumulating so many of them, it got to be a problem just remembering all the ones I had and how to trigger them. I had to start finding new ways of keeping them all organized. That led to figuring out two things that I'm still really proud of and use every day: custom right-click menus and Emacs-style keychords.
The custom right-click menu is: any time I right-click while also holding down Ctrl or Alt, it opens a right-click dialogue run by AutoHotkey, not the default one in the given context. That lets me visually select what I want to happen rather than needing an arcane key combo for every thing. All of my frequently-used Regex functions are right-click menus now.
The key chords are: if I trigger a "prep" hotkey first—my most-used one is "Alt+G" for "Go-to"—it sets up a keyboard hook that listens for the next key and then dispatches to a function based on that. So, "Alt+G H" would be really easy to remember in my head as "Go to Hacker news." And it pops open a new tab in my browser. I use that one a lot for opening desktop applications—"Alt+O C" maps in my head to "Open vs Code." Super easy to remember.
I've automated 80% of the most common navigation items at my job this way. My coworkers have seen me do it and stopped me to ask, "Wait, tell me how you did that." It looks and feels like magic.
To my knowledge, this was the first "site-specific" browser extension, so I wrote a blog post about it:
https://www.holovaty.com/writing/all-music-guide/
Aaron Boodman saw my post and decided to generalize the idea; he created Greasemonkey, which was a single browser extension that could aggregate site-specific JS customizations. In the years since, this idea of "user scripts" has further developed, and I think some browsers even support the concept natively.
I'd never written a line of code in my life, so going through the iterative process of getting it functioning and fixing bugs was pretty invigorating. I could see where the generated code was going awry and describe it in natural language, and chatGPT would turn that into syntax and explain why it worked. Definitely a fun way to learn.
I'm sure it's ugly/inefficient, but here's the script: