If a license or copyright for a particular piece of work I have created is specified(Typically included with Source Code, images, maps, assets E.T.C.), then you may use my work following the license given, or with respect to my copyright on it. If it is public domain, feel free to use it. If it has no license included with it, but has copyright, you may license the work under the WTFPL License. The text for this license is linked here.
This will be judged on a situation-by-situation basis. The generality of it, is don't be a dick about it. Don't just grab my source code, compile it and sell it off. If I find cases of that I will not look favourably on it and may take action(Assuming it's not Public Domain). If it is a derivative work, asset flip(throwing together other peoples assets to make a game), mod or anything that isn't just copying and selling my work off, I will be fine with it.
If you do use any of my work, and the license doesn't specify credit being required, you do not need to credit me, though I will still appreciate it greatly if you do.