Stackoverflow

How to avoid git conflicts when working with a team?

A new team member started working on the same project as me the last week.
After checking their first commit, I noticed they mixed refactoring with eclipse auto-formatting. What made this an even worse  transgression was that they have a custom maximum character width defined in their editor.  I am not against aggressively formatting or refactoring code Рexcept when it is related to critical production code.

GIT diff unfortunately cannot handle these kinds of source refactoring changes and lists the whole file as changed. See: http://stackoverflow.com/questions/21897386/git-diff-ignore-all-linefeeds-between-revisions

After reading I came across the following gem on stackoverflow (How to avoid git conflicts when working with a team? from User Christopher) which I quote/steal from.

Ask your team three questions:

  1. Do we enforce whitespace conventions?automatically finalize parameters.
  2. Do we generate textual build artifacts? For example, do we minify js, generate css rules from .sass or .scss files, or build xml configurations on the fly? Do we check them in?[…]

These three things cause the vast majority of our collective conflict pain:

Versioning Pain

More

JQuery Calendar and PHP: Handling Inserts

1) Getting Current Time in Javascript

The ISO 8601 date format can be utilized to convert the date on the browser side to a format that include timestamp information. Quoting from here:

Note that the “T” appears literally in the string, to indicate the beginning of the time element. Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator (“Z”). Used in ATOM RSS feeds.

function fnISO() {
// Only works in Firefox using ECMAScript 5
var now = new Date().toISOString();
alert(now);
}

Result: 2009-08-06T23:36:31.390Z

More

Greesemonkey Script for filtering Stackoverflow Bounty Page

I’m a big fan of stackoverflow and many times surf the featured page that has many questions that have an additional bounty attached.
One of the things though that I want to do is quickly find the questions with zero answers that have not received attention due to one reason or another (e.g. very difficult).

For the specific URL: http://stackoverflow.com/questions?sort=featured , Below a greesemonkey script just for that!

More