Skip to content

Instantly share code, notes, and snippets.

@jaichandra
jaichandra / dieassert.js
Created November 15, 2020 15:56 — forked from jeromeetienne/dieassert.js
a console.assert which actually stop the execution
/**
* A console.assert which actually stop the exectution.
* default console.assert() is a plain display, such as console.log() or console.error();
* It doesnt stop the execution like assert() is meant to do. This is a little code to
* "workaround this limitation" :) thanks @jensarp
*
* Usage:
* console.assert(foo === bar); // Will throw if not equal
* console.assert(foo === bar, 'Dude, foo does not equal bar'); // Will throw with custom error message
*
@jaichandra
jaichandra / filemerge-sourcetree.txt
Created March 1, 2016 04:28
filemerge not opening in sourcetree
This issue was due to xcode-select developer directory pointing to /Library/Developer, which only contained the folder CommandLineTools. To this end, the error message is complaining about not the directory not being the same as Xcode.
Two tested solutions:
(Re) Install Xcode.
Point xcode-select to the Xcode Developer Directory using the following command:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer