{% verbatim %}
{{ vueVariable }}
{% endverbatim %}
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
/** | |
* @source https://gist.github.com/artemsites/8d260ef1682d10c70c2cf1cd256c629d | |
*/ | |
export default function getParamFromUrlSearch(paramName) { | |
if (location.search) { | |
let params = location.search.split('?')[1].split("&") | |
let param = params.find(p=>p.includes(paramName)) | |
if (param) return param.split('=')[1] | |
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
<div class="slider"> | |
<div class="item n1">1</div> | |
<div class="item n2">2</div> | |
<div class="item n3">3</div> | |
</div> |
docker https://beget.com/ru/kb/how-to/web-apps/obshhie-svedeniya-po-ustanovke-prilozhenij-virtualnoe-okruzhenie-docker
python https://beget.com/ru/kb/how-to/web-apps/python
# Docker:
ssh localhost -p222
# и мой рут пароль от акка
python2.7 -m pip install ezdxf --user --ignore-installed
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 | |
/** | |
* !@note Проверка что запрос к api был с того же источника что и сам роут | |
*/ | |
function validate_request_origin(/* WP_REST_Request $request */) { | |
$request_origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : ''; | |
$site_url = parse_url(get_site_url()); | |
if (parse_url($request_origin, PHP_URL_HOST) === $site_url['host']) { |
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 | |
function write_csv_register_rest_route() | |
{ | |
register_rest_route('write_csv/v1', '/process', array( | |
'methods' => 'POST', | |
'callback' => 'write_csv_process_callback', | |
'permission_callback' => 'validate_request_origin' | |
)); | |
} |
sudo npm install -g localtunnel
Запустить тунель в интернет на локальный хост http://127.0.0.1:8000
lt --port 8000
lt -l sitename.local --port 80
let tags = ['TITLE', 'META', 'SCRIPT', 'HEAD', 'LINK', 'STYLE']
document.querySelectorAll('*').forEach(function(node) {
if (!tags.includes(node.tagName)) {
if (window.getComputedStyle(node).display === 'none' || window.getComputedStyle(node).visibility === 'hidden') {
console.log(node)
node.style.display = 'block';
node.style.visibility = 'visible';
node.style.border = '3px solid red';
node.style.position = 'fixed';
NewerOlder