Posts

Showing posts from 2017

GIT - Mind the End of Your Line

From http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line Mind the End of Your Line March, 2012 One of the most frequent questions I answer about Git is why dealing with line endings is so difficult. This is an attempt to answer that question and explain the myriad of options and settings that control line endings in Git. Git has gone through two systems for dealing with line endings in repositories. The root of the problem being that Unix, Linux and OS X use   LF   and Windows uses   CRLF   to denote the end of a line. Previous to OS X, Mac actually used   CR , but for the most part we can ignore that. None of this would be a problem if we each lived in our own little worlds and never shared code between operating systems. And by share I mean everything from working on a cross platform project to copy-pasting code out of a browser. In fact, anytime you download a sample project in a zip file, copy code out of a gist, copy code from someones blog or

Delete (outlook) reminders that keep returning

Image
From  https://www.slipstick.com/outlook/calendar/delete-reminders-that-keep-returning/ When reminders just won't dismiss, there are several things you can try to get rid of it: Use the  Cleanreminders switch . This works most of the time. When cleanreminders doesn't work,  look for the appointment  the reminder belongs to and delete it. When you can't find the appointment, you need to use  MFCMAPI  to browse "inside" the message store and delete the reminders. Outlook will then rebuild the list with just the valid reminders. Use Cleanreminders switch The easiest way to try to get rid of corrupt reminders is by closing Outlook and reopening it using the /cleanreminders switch. To do this, press Windows key + R to open the Run dialog. type outlook /cleanreminders in the field and press Ok. Make sure you have a space between Outlook and the slash. Using 'outlook.exe' is optional - just the program name should work. A (very) few people

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 '