Skip to content

Instantly share code, notes, and snippets.

View boltex's full-sized avatar
😎
Coding

Felix boltex

😎
Coding
View GitHub Profile
{
// -------------------------------------------- WINDOW
"window.zoomLevel": 2,
// -------------------------------------------- EDITOR
"editor.fontSize": 15,
//"editor.formatOnPaste": true,
"editor.parameterHints.enabled": true,
"editor.selectionClipboard": false, // DOES NOT WORK!
"editor.formatOnSave": true,
"editor.multiCursorModifier": "ctrlCmd",
@boltex
boltex / gist:9ff1c16a0e6f1e314314
Created July 23, 2015 19:49
cmpVersion Is a javascript utility function to compare version strings with multiple decimal points. (such as "1.1.13")
function cmpVersion(a, b) {
var i, cmp, len, re = /(\.0)+[^\.]*$/;
a = (a + '').replace(re, '').split('.');
b = (b + '').replace(re, '').split('.');
len = Math.min(a.length, b.length);
for( i = 0; i < len; i++ ) {
cmp = parseInt(a[i], 10) - parseInt(b[i], 10);
if( cmp !== 0 ) {
return cmp;
}