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 isPrime(num) { | |
const root = Math.sqrt(num); | |
if (root <= 1) { | |
return false; | |
} | |
for (let i = 2; i <= root; i++) { | |
if (num % i === 0) { | |
return 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
/** | |
* Function to check if current day and time fit the opening hours. | |
* @param {number[]} openDays - Array of days represented as numbers, sunday - saturday : 0 - 6. | |
* @param {number} openingTime - Opening time in minutes, 9:00 : 9 * 60. | |
* @param {number} closingTime - Closing time in minutes 17:00 : 17 * 60. | |
* @return {boolean} | |
*/ | |
function isOpeningHours(openDays = [1, 2, 3, 4, 5], openingTime = 9 * 60, closingTime = 17 * 60) { | |
const date = new Date(); |
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
#!/bin/sh | |
for f in `find . -name "*.htm" -o -name "*.html" -o -name "*.xml"` ; | |
do | |
echo `file -I "$f"` ; | |
done |
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
@supports (display: flex) { | |
.row--flex { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
.row--flex:before, | |
.row--flex:after, | |
.row--flex > .clearfix:before, |