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 pxToVw($px, $base: 1440) { | |
@return $px / 10 + rem; | |
} | |
$sizes: ( | |
'headline64': ( | |
font-size: 64, | |
font-weight: 500, | |
line-height: 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
[generated bytecode for function: flatComments] | |
Parameter count 2 | |
Frame size 40 | |
713 E> 0x15d2a92ef412 @ 0 : a1 StackCheck | |
0x15d2a92ef413 @ 1 : 25 02 Ldar a0 | |
0x15d2a92ef415 @ 3 : 99 06 JumpIfNotUndefined [6] (0x15d2a92ef41b @ 9) | |
0x15d2a92ef417 @ 5 : 78 00 CreateEmptyArrayLiteral [0] | |
0x15d2a92ef419 @ 7 : 87 04 Jump [4] (0x15d2a92ef41d @ 11) | |
0x15d2a92ef41b @ 9 : 25 02 Ldar a0 | |
0x15d2a92ef41d @ 11 : 26 fb Star r0 |
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
<script> | |
function r(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; //Максимум и минимум включаются | |
} | |
const m = r(7, 10) | |
const y = new Date().getFullYear() + 1 | |
const d = r(1, 28) |
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
import { createEvent, createStore } from 'effector' | |
import { useLayoutEffect } from 'react' | |
import { useStoreMap } from 'effector-react' | |
const portalSetted = createEvent() | |
const portalRemoved = createEvent() | |
const $portal = createStore({}) | |
$portal | |
.on(portalSetted, (state, { destination, children }) => ({ | |
...state, |
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
<?php | |
use DOMDocument; | |
use DOMNode; | |
use DOMNodeList; | |
use Illuminate\Support\Collection; | |
final class HTML2EditorJS | |
{ | |
private $document; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Editor.js playground</title> | |
</head> | |
<body> | |
<div id="editor"></div> |
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
version: '3' | |
services: | |
web: | |
image: nginx | |
volumes: | |
- ./.docker/conf/nginx/default.conf:/etc/nginx/conf.d/default.conf | |
- .:/var/www/html | |
ports: | |
- 5000:80 | |
restart: always |
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
import React from 'react' | |
import PropTypes from 'prop-types' | |
function areChildrenDifferent (oldChildren, newChildren) { | |
if (oldChildren === newChildren) return false | |
if ( | |
React.isValidElement(oldChildren) && | |
React.isValidElement(newChildren) && | |
oldChildren.key != null && | |
oldChildren.key === newChildren.key |
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
import { useContext, useLayoutEffect } from 'react' | |
import { PortalContext } from './PortalContext' | |
export function Portal ({ to, children }) { | |
const { addTarget, removeTarget } = useContext(PortalContext) | |
useLayoutEffect(() => { | |
addTarget(to, children) | |
return () => { | |
removeTarget(to) | |
} |
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 {object} obj | |
* @param {string} path | |
* @example ```js | |
getByPath(obj, 'a.c.b.0.c') | |
``` | |
*/ | |
export const getByPath = (obj, path) => { | |
if (obj == null) return null |
NewerOlder