I have created two files everything.js and everything.php. Any time I find a useful function I just add it to those files with a comment and example (if php inside a !defined_fn block). For local weekend projects I'm not embarrassed to say that I sometimes just include the whole file. It saves me a lot of time and helps me work on the thing I intend to work on instead of searching the net or wasting time on thinking…
I mostly do frontend development, so I just use codepen, and tag all my codepens so its easy to search. Then I bookmark that page. I have all those files backed up by gists. I might try the "everything.php" or "everything.js" file, scrolling through a single page makes a lot of sense for me as well. But I find I just reference the actual repository in github for backend things, so I can see the context of the use cas…
It really doesn't even take me 3 steps to find it anymore since I name the functions quite intuitively (str_match_brackets_balanced) so anytime i type strbrackbal phpstorm automatically autocompletes the function for me. Similar for JS though I haven't been able to create any categories and everything.js is all that is.