Words are often overloaded with meaning in philosophy. A "gift" in philosophy may be a far more pure concept than a "gift" given in modern culture. They could have given it a new name (I'm partial to "a gift freely given," myself, but that's a longer phrasing), but they chose to call the concept they were exploring "gift" to associate it just enough with cultural gift giving to help give the idea lift.
The idea behind such a gift is that if you have conditions, it is no longer considered a gift, but rather a transaction. For the most extreme examples, we can look at the mafia, where a gift from the mafia Don rarely comes without strings attached. Often, it looks like the Don isn't giving anything, but rather taking under the guise of giving!
A less extreme example is a gift given in exchange for a favor. "I'll help you move, but you owe me a favor." It's not specified what that favor is, but it is understood that the transaction is "move your stuff" in exchange for "an obligation to return the favor later."
You can continue this way of thinking, approaching less and less of a transaction, as we go through the various shades of gifts in one's culture. The philosophical "gift" mentioned here is the limit of that approach.
So as for your questions:
I believe it is fair to say a something given with an expectation of repayment, but for which one does not analyze what the repayment may look like or when could qualify as a gift, if one truly does not analyze it. If you feel the other person has every right to not repay you, it may qualify as a true gift because you have accepted that a purely one sided transaction may occur, and that transaction is "good enough." Let's say I give you $100, and say "pay me back when you can." If I have some expectation that you will pay me back, I just don't know when, and I feel slighted if you never pay me back, then it is not a gift by this definition. On the other hand, if we are close friends, you are down on your luck, and I think it's entirely reasonable that you may never again have $100 in your pocket, or if you're about to leave my life forever (perhaps a perceived permanent move to a foreign country), that $100 may be a gift, in that I never actually expect it to be given back again.
In fact, I found a fascinating ritual from India which pushes this to the limit. One of my friends recently got married and had invited a friend whose family still had strong ties to Indian culture. In addition to the traditional wedding gifts, he explicitly gave a single dollar bill. He explained that this was not a gift, it was a loan. The idea was that his family and my friend's newly married family must now stay close together, or else they'd never be able to repay the loan.
It does appear that this "loan," despite its name is a gift. It's quite clear you are never expected to actually repay the loan. In fact, I think repaying the loan may be a grave insult! And its also clear that a mere $1 is not going to really have any influence on keeping the family together, so it's clear its not actually buying any closeness. Thus, this loan is truly a gift: there's no expectation of anything in return, though there is an encouragement associated with the act of giving to keep the families close together.
The second question is the opposite half of the first concept. If one has "earned" a gift, that implies a transaction in the opposite direction. It implies the gift giver has come under an obligation to give a gift. Thus, the transaction is the resolution of this obligation in exchange for the gift.
And yes, this sort of gift is defined by the actions and thoughts of the giver only. If I truly "give" a McDonalds meal to a homeless man on the street who has a sign that says "hungry," and he chooses to stomp it to bits and flip me off, insulted that I didn't give him a dollar, that is his right. The gift has been given. This is also part of why an obligation cannot be part of a gift in this respect. If I gave you a dog, and you didn't want it, you might not take care of the dog. I could not come back and say "I gave you the dog, so it was your job to take care of it," because that means the "gift" came with obligations.
I found another fascinating story along these lines from Siam, now known as Thailand. In their culture, White Elephants are a symbol of peace and prosperity within the kingdom. However, they have a dark side. If a king did not like the actions of a courtier in their court, they may "gift" a White Elephant to them. This "gift" was far too much of an honor to possibly refuse it, but it came with an obligation to take care of it (making it not qualify as a gift by Derrida's standards). The cost of maintaining a White Elephant was astonishing, because they were expected to keep this elephant in a life of luxury, being such a valuable gift from the king. A courtier could literally be bankrupted by this "gift."