Can anyone please provide a simple explanation of the phrase "in before" with some common-usage examples.
Is it appropriate to use this phrase in a context such as "This happened and then this happened in before I realised that I have to do this."?
The short answer: No, that is not appropriate. You should just use ‘before’ in that sentence.
‘In before’ is not really a phrase as such. It is just the adverb/preposition ‘in’ followed by the preposition/conjunction/adverb ‘before’ (word class for ‘in’ and ‘before’ written in subscript after each occurrence):
He opened the door and went inadv beforeconj I had the chance to tell him the floor was broken.
A: “My brother’s inprep jail again …”
B: “Again? Has he been inadv beforeadv?
There is one case where ‘in before’ is used in what might appear to be a collocative way, which is on Internet forums and like places. In this case, inadv refers to managing to get your post in (i.e., to submit your post) beforeprep someone else, or beforeconj someone else comes along.
An example: say there is someone on an Internet forum who is well-known for being obsessed with ravioli and the proper way to make them. We shall call this user RavioliMeister. If someone on the forum then creates a thread about some delicious instant ravioli they made last night, regulars on the forum can be certain that RavioliMeister will come along and make a long post about the evils of instant ravioli and the fantasticness of home-made ravioli. Because RavioliMeister is quite obsessed with ravioli, he is imagined to almost have a sixth sense about the topic, and to come running as soon as anything is posted about them.
If one of these regular users then sees the thread before RavioliMeister and makes a post, he is quite likely to say:
In before RavioliMeister!
That is then jargon corresponding more or less to:
Look, everyone! I was so quick to post in this thread that I managed to get my post inadv beforeconj RavioliMeister came along to write the post we all know he is going to write!
I had never heard of it, but from Google I get:
In before X, often abbreviated as “in b4,” is an expression commonly used on discussion forums and imageboards to forecast an anticipated response or a predictable outcome within a given thread.
In before X (sometimes "inb4 X") is most often used as the first reply to a thread or comment, and only if that thread or comment is bait: that is, there is at least a 100% chance that someone else will reply to the OP using a particular meme, flame, or solution.