There have been a few pretty recent studies to show that it's affects on muscular hypertrophy are close to nill. Yes, it is an anti inflammatory but it's not going to do much in real life. I used to become fearful that taking NSAIDs after a workout or later in the day would negate the workout I just had, but now my concerns are quelled.
I have amazingly painful migraines and tried to abstain from using NSAIDs but now I take them as needed. I only take generic, liquid advil because it's cheap, effective and does the least damage imho. No need to worry. If you're taking NSAIDs on a regular basis though, you need to get to the root of the problem. I personally smoke marijuana which alleviates my headaches and migraines almost magically. Far better than any drug the doctors have put me on.
Keep your diet in check, rest up appropriately, sleep well (HUUUUUUGE FACTOR), don't abuse stimulants, meditate or do something relaxing EVERYDAY, eat well, stay hydrated, be happy and live as stress free as possible. The best thing to do is to avoid getting a headache in the first place, then you won't have to take any sort of NSAID.