This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*-javascript*-* | |
* Rename folder from Metadata (Rename mask) | |
*/ | |
function ifnotempty(value, sep) { | |
return value.length > 0 ? value + sep : ''; | |
} | |
function ifnotempty2(value1, value2, sep) { | |
return value1.length > 0 ? value1 + sep : value2.length > 0 ? value2 + sep : ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*-javascript -*- | |
* Rename folder from Metadata (Compilation rename mask) | |
*/ | |
function ifnotempty(value, sep) { | |
return value.length > 0 ? value + sep : ''; | |
} | |
function ifnotempty2(value1, value2, sep) { | |
return value1.length > 0 ? value1 + sep : value2.length > 0 ? value2 + sep : ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*-javascript-*- | |
Rename file from Metadata (Rename mask) | |
*/ | |
function pad(number, length) { | |
if (number == '') { return ''; } | |
var str = '' + number; | |
while (str.length < length) { | |
str = '0' + str; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*-javascript-*- | |
* Rename file from Metadata (Compilation rename mask) | |
*/ | |
function pad(number, length) { | |
if (number == '') { return ''; } | |
var str = '' + number; | |
while (str.length < length) { | |
str = '0' + str; | |
} | |
return str; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*-javascript-*- | |
function ifnotempty(value, sep){ | |
return value.length > 0 ? value + sep : ''; | |
} | |
function ifnotempty2(value1, value2, sep){ | |
return value1.length > 0 ? value1 + sep :value2.length > 0 ? value2 + sep:'' ; | |
} |