Posts

Showing posts from September, 2017

Simplified GIT dataflow

Image
From https://commons.wikimedia.org/wiki/File:Git_data_flow_simplified.svg

Temporarily ignoring files in GIT

From [http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html] This prevents the changes to a file in the local repository to be pushed to the remote repository. temporarily ignoring files committed 18 Feb 2009 Usually  ignoring files  is quite simple with Git. However, you may need to quickly hide changes in a file, perhaps for an entire development session or other reasons. Luckily there’s a simple way around this, thanks to some clever manual diving from  Eelco Wiersma . His main problem was using  git commit -a , which automatically adds files that are modified into the commit object. This is a neat shortcut, but make sure you  understand the staging area  if you find yourself running this command all the time. So, to temporarily ignore changes in a certain file, run: git update-index --assume-unchanged <file> Then when you want to track changes again: git update-index --no-assume-unchanged <file> Obviously there’s quite a few ca

MySQL - Merge overlapping date intervals

Image
Found in [https://stackoverflow.com/questions/2561130/merge-overlapping-date-intervals] Merge overlapping date intervals Is there a better way of merging overlapping date intervals? The solution I came up with is so simple that now I wonder if someone else has a better idea of how this could be done. /***** DATA EXAMPLE *****/ DECLARE @ T TABLE ( d1 DATETIME , d2 DATETIME ) INSERT INTO @ T ( d1 , d2 ) SELECT '2010-01-01' , '2010-03-31' UNION SELECT '2010-04-01' , '2010-05-31' UNION SELECT '2010-06-15' , '2010-06-25' UNION SELECT '2010-06-26' , '2010-07-10' UNION SELECT '2010-08-01' , '2010-08-05' UNION SELECT '2010-08-01' , '2010-08-09' UNION SELECT '2010-08-02' , '2010-08-07' UNION SELECT '2010-08-08' , '2010-08-08' UNION SELECT '2010-08-09' , '2010-08-12' UNION SELECT '