How to use bp-custom.php properly with BuddyDev snippet?

Okay, so I found this brilliant code snippet by BuddyDev(tinyurl.com/lpxbrwc), but, being a newbie to all of this, I have absolutely no clue how to use it.

I want to use the first code snippet of the article to hide a specific user (with username: wpengine and ID: 1) from my Buddypress Members Directory.

Can somebody post what I would exactly need to enter into bp-custom.php (tags, no placeholders, etc.)? As in, I could just copy and paste this into my bp-custom.php and it should work as is.

This would be really appreciated.