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
git config --global core.editor "code --wait" |
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
@font-face { | |
font-family: "Name"; | |
font-style: normal; | |
src: url("../fonts/name-Medium.woff2") format("woff2"), | |
url("../fonts/name-Medium.woff") format("woff"); | |
font-weight: 500; | |
} | |
@font-face { | |
font-family: "Name"; |
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
if (window.NodeList && !NodeList.prototype.forEach) { | |
NodeList.prototype.forEach = function (callback, thisArg) { | |
thisArg = thisArg || window | |
for (var i = 0; i < this.length; i++) { | |
callback.call(thisArg, this[i], i, this) | |
} | |
} | |
} | |
// Или |
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
// Открытие элемента в полноэкранный режим | |
const launchFullScreen = (el) => { | |
if (el.requestFullscreen) { | |
el.requestFullscreen() | |
} else if (el.webkitRequestFullScreen) { | |
el.webkitRequestFullScreen() | |
} else if (el.mozRequestFullScreen) { | |
el.mozRequestFullScreen() | |
} else if (el.msRequestFullscreen) { | |
el.msRequestFullscreen() |
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
git rm --cached src/*.html |
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 debounce (func, wait, immediate) { | |
let timeout | |
return function () { | |
const context = this | |
const args = arguments | |
const later = function () { | |
timeout = null | |
if (!immediate) { | |
func.apply(context, args) |
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
const getRandomNumber = (min, max) => { | |
return Math.round(min - 0.5 + Math.random() * (max - min + 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
const easings = { | |
linear (t, b, c, d) { | |
return c * t / d + b; | |
}, | |
easeInQuad (t, b, c, d) { | |
return c * (t /= d) * t + b; | |
}, | |
easeOutQuad (t, b, c, d) { | |
return -c * (t /= d) * (t - 2) + b; | |
}, |
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
find . -name "node_modules" -exec rm -rf '{}' + |
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
const validateEmail = (email) => { | |
const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ | |
return re.test(email) | |
} |
OlderNewer