This file contains hidden or 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
// index.js | |
export * as MathUtils from "./math.js"; | |
export * as StringUtils from "./string-utils.js"; | |
// Usage: | |
// import { MathUtils, StringUtils } from './index.js'; | |
This file contains hidden or 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
_ |
This file contains hidden or 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
<!-- 1 --> | |
<component | |
v-if="transport?.image" | |
:is="typeof transport.image === 'object' ? 'aw-img' : 'img'" | |
v-bind=" | |
typeof transport.image === 'object' | |
? { image: transport.image, size: 'eop-icon', style: 'max-width: 40px' } | |
: { src: transport.image, size: 'eop-icon', style: 'max-width: 40px' } | |
" | |
/> |
This file contains hidden or 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
<?php | |
// Pro hesla uživatelů | |
$hashedPassword = password_hash($userPassword, PASSWORD_DEFAULT); | |
if (password_verify($inputPassword, $hashedPassword)) { | |
// přihlášen | |
} | |
// Pro bearer tokeny | |
$token = hash_hmac('sha256', $windowStart, 'secret'); |
This file contains hidden or 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://learnvue.co/articles/v-once-v-memo | |
<script setup> | |
import { ref } from 'vue' | |
const subscribers = ref(4000) | |
const views = ref(10000) | |
const likes = ref(3000) | |
</script> | |
<template> |
This file contains hidden or 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://medium.com/@genildocs/mastering-object-oriented-programming-in-javascript-from-zero-to-hero-c718c3182eba | |
// Mixin for logging functionality | |
const LoggerMixin = { | |
log(message) { | |
console.log(`[${this.constructor.name}] ${message}`); | |
}, | |
logError(error) { | |
console.error(`[${this.constructor.name}] ERROR: ${error}`); |
This file contains hidden or 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.youtube.com/watch?v=0L6GXC5jl1I | |
--> | |
<script setup> | |
import { ref, computed, toValue } from 'vue' | |
function useName(name) { | |
const changedName = computed(() => toValue(name).toUpperCase()) | |
return { |
This file contains hidden or 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
// Pattern 1 — Bind Helper | |
export function S(selector) { | |
const nodes = document.querySelectorAll(selector); | |
nodes.forEach(bindAll); // Bind helpers to node(s) | |
return nodes.length > 1 ? nodes : nodes[0]; // native node(s) returned | |
} | |
export function C(tag) { |
This file contains hidden or 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
_ |
This file contains hidden or 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
.modal { | |
/* Hidden state */ | |
display: none; | |
opacity: 1; | |
} | |
.modal.open { | |
display: block; | |
/* Regular transition works now */ | |
transition: opacity 300ms; |
NewerOlder