tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
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
//https://www.codewars.com/kata/52742f58faf5485cae000b9a/train/javascript | |
function formatDuration(seconds) { | |
if(seconds == 0 ) return "now"; | |
t = Number(seconds); | |
var y = Math.floor(t / (3600*24*365)); | |
var d = y > 0 ? Math.floor(t % (3600*24*365) /(3600*24)) : Math.floor(t / (3600*24)); | |
var h = d > 0 ? Math.floor((t % (3600*24*365)) %(3600*24) /(3600) ) : Math.floor(t / 3600); |
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
//https://www.codewars.com/kata/59a96d71dbe3b06c0200009c/train/javascript | |
function generateShape(num){ | |
var outcome = ""; | |
for(var i = 0; i < num;i++){ | |
for(var j = 0; j < num;j++){ | |
outcome=outcome+"+"; | |
} | |
outcome=outcome+"\n"; | |
} |
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
// https://www.codewars.com/kata/56c24c58e0c0f741d4001aef/train/javascript | |
const isReallyNaN = (val) => { | |
return Number.isNaN(val); | |
}; | |
console.log(isReallyNaN(37), false) | |
console.log(isReallyNaN('37') , false) | |
console.log(isReallyNaN(NaN) , true) | |
console.log(isReallyNaN(undefined) , false) |
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
// https://www.codewars.com/kata/576b93db1129fcf2200001e6/train/javascript | |
function sumArray(array) { | |
// --- simple output controls | |
if(!array) return 0 ; | |
if(array && Object.keys(array).length <=2) return 0; | |
// -- find the maximum and the minimum | |
const max = Math.max(...array); | |
const min = Math.min(...array); |
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
/** | |
* @param {*[]} comboOptions | |
* @param {number} comboLength | |
* @return {*[]} | |
*/ | |
function combineWithRepetitions(comboOptions, comboLength) { | |
// If the length of the combination is 1 then each element of the original array | |
// is a combination itself. | |
if (comboLength === 1) { |
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
// https://www.codewars.com/kata/591e833267cd75cb02000007/train/javascript | |
checkRange=(a,x,y)=>a.map(v=>i+=x>v==v>y,i=0)|i |
Info laravel 9 doc
composer create-project laravel/laravel example-app
NewerOlder