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
interface Position { | |
x: number; | |
y: number; | |
} | |
interface GridOptions { | |
elements: { | |
text: string; | |
}[]; | |
} |
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
export function easeInOutQuad(t) { | |
return t * (2 - t); | |
} | |
/** | |
* Erase symbol one by one | |
* @param {Element} element | |
*/ | |
export function smoothErase(element) { | |
const text = element.innerHTML; |
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 | |
if (!function_exists('path_resolve')) { | |
/** | |
* Converts parts of the file path to the correct full path. | |
* @param string ...$parts | |
* @return string|string[]|null | |
*/ | |
function path_resolve(string ...$parts): string | |
{ |
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
/** | |
- Create responsive font-size; | |
min = minimal font size | |
max = maximal font size | |
min_view = minimal view width | |
max_view = maximal view width | |
*/ | |
responsive-font(min, max, min_view, max_view) | |
font-size: "calc(%spx + (%s - %s) * ((100vw - %spx) / (%s - %s)))" % (min max min min_view max_view min_view) |
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 | |
/* Laravel 5.6 */ | |
/** | |
* model | |
* Upload image | |
*/ | |
/*----- Don't use -----*/ | |
function photo($file) |
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
#Для фреймворков - стандартный | |
server { | |
server_name [название]; | |
root [путь]; | |
index index.html index.php; | |
location / | |
{ | |
try_files $uri $uri/ /index.php?$args; | |
} | |
location ~ \.php$ |
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 | |
/** | |
* Добавление в конфиг запись | |
*/ | |
public function newRoute($POST) | |
{ | |
$replace = "$1$2 | |
\"{$POST['url']}\" => [ | |
\t\"controller\" => \"{$POST['controller']}\", | |
\t\"action\" => \"{$POST['action']}\", |