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
$('img').each(function(){ | |
let t = $(this); | |
let url = `https://dummyimage.com/${Math.round(t.outerWidth())}x${Math.round(t.outerHeight())}/f0f0f0/999`; | |
console.log(`${Math.round(t.outerWidth())}x${Math.round(t.outerHeight() => ${t.attr('src')}`); | |
t.attr('src', url); | |
}); |
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
/** | |
* Tool to autofill some forms | |
*/ | |
function randomiza(n) { | |
return Math.round(Math.random() * n); | |
} | |
function getRange(min, max) { | |
return 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
Considering $4 is the position of DataTime on access_log file | |
cat /var/log/httpd/access_log | awk '$4 >= "[14/Apr/2020:09:50:00" && $4 < "[14/Apr/2020:10:15:00"' |
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
Analyser: | |
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-suggesters-phrase.html | |
Template: | |
POST /_template/template_produtos | |
{ | |
"index_patterns": [ | |
"produto*" | |
], | |
"settings": { |