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
$.fn.makeEqual = function(){ | |
var self = this, | |
heights = $.map(this, function(el){return $(el).height();}), | |
heighestHeight = Math.max.apply(null, heights); | |
this.removeHeight = function(){ | |
$.each(self, function(i, el){ | |
$(el).css("min-height", ""); | |
}); | |
}; |
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
var fs = require('fs'); | |
var http = require('http'); | |
var ROOT = '/'; | |
var dataString1 = "img1,img2,img3"; | |
function download(list, index){ | |
var file = list[index].trim(); | |
var url = ROOT + file; |
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
function shuffle(list){ | |
if(list.length === 1){ | |
return list; | |
} | |
let min = 0; | |
let max = list.length - 1; | |
let randomIndex = Math.floor(Math.random() * (max - min + 1)) + min; | |
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
Make it run, then make it right, then make it fast |
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
/** | |
* Determines if two objects are equal based on a list of keys | |
* | |
* object1, object2: Object | |
* keys: Array | |
*/ | |
function keysEqual(object1, object2, keys) { | |
for (let i = 0, len = keys.length; i < len; i++) { | |
const key = keys[i]; | |
// if one key is not euqal then the two objets are not equal |
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
var re = /\[(.+?)]\((.+?)\)/ig; | |
var str = '[Mihaela Popescu](popover://contact/891) vezi [CE1211](popover://ask/21)'; | |
var m; | |
var foundMatches = [] | |
var result = [str] | |
while ((m = re.exec(str)) !== null) { | |
// every m looks like this | |
// ["[Mihaela Popescu](popover://contact/891)", "Mihaela Popescu", "popover://contact/891"] |
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
68034 silly gunzTarPerm modified mode [ 'node_modules/rc/LICENSE.MIT', 420, 436 ] | |
68035 silly gunzTarPerm extractEntry node_modules/rc/lib/utils.js | |
68036 silly gunzTarPerm modified mode [ 'node_modules/rc/lib/utils.js', 420, 436 ] | |
68037 silly gunzTarPerm extractEntry node_modules/rc/LICENSE.BSD | |
68038 silly gunzTarPerm modified mode [ 'node_modules/rc/LICENSE.BSD', 420, 436 ] | |
68039 silly gunzTarPerm extractEntry node_modules/rc/test/ini.js | |
68040 silly gunzTarPerm modified mode [ 'node_modules/rc/test/ini.js', 420, 436 ] | |
68041 silly gunzTarPerm extractEntry node_modules/rc/test/nested-env-vars.js | |
68042 silly gunzTarPerm modified mode [ 'node_modules/rc/test/nested-env-vars.js', 420, 436 ] | |
68043 silly gunzTarPerm extractEntry node_modules/rc/test/test.js |
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
var exec = require('child_process').exec; | |
var command1 = `ls -l` | |
var command2 = `ls` | |
var command3 = `cd ..` | |
var intervalCommand1 = ( // 10 ore | |
1000 * 10 | |
// 60 * // sec | |
// 60 * // min | |
// 10 // ore |
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
var exec = require('child_process').exec; | |
var command1 = `ls -l` | |
var command2 = `ls` | |
var command3 = `cd ..` | |
var intervalCommand1 = ( // 10 ore | |
1000 * | |
60 * // sec | |
60 * // min | |
10 // ore |
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
var exec = require('child_process').exec; | |
var command1 = `ls -l` | |
var command2 = `ls` | |
var command3 = `cd ..` | |
var intervalCommand1 = ( // 10 ore | |
1000 * 60 * 2 | |
// 60 * // sec | |
// 60 * // min | |
// 10 // ore |
OlderNewer