Coding Style
No tabs
Do not use tabs. Always use 4 space characters instead.
One exception to this rule is in projects using the GNU coding style (where the first level of indentation is 2 space characters).
No trailing spaces
Do not leave trailing spaces in your code.
120 char line length
Fit your code within 120 columns.
If a line of code is longer than 120 characters, break it into two or more lines.
Simplicity
Prefer simple constructions over complicated ones, even if that means using more lines or even duplicating code.
Avoid one-liners, complicated conditions, language-specific tricks, abstract/generic patterns.
Consistency
Other than the rules above, adopt the coding style used in the project you're contributing to.
With the exception of tabs, line length and trailing spaces, this guarantees consistency between your new code and the existing code.