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
<?xml version='1.0' encoding='utf-8'?> | |
<plugin id="maxim-kolmogorov-echo-test" version="0.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android"> | |
<name>EchoTest</name> | |
<js-module name="EchoTest" src="www/EchoTest.js"> | |
<clobbers target="echotest" /> | |
</js-module> | |
<platform name="ios"> | |
<config-file target="config.xml" parent="/*"> | |
<feature name="EchoTest"> | |
<param name="ios-package" value="EchoTest" /> |
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
var exec = require('cordova/exec'); | |
exports.echo = function(arg0, success, error) { | |
exec(success, error, 'EchoTest', 'echo', [arg0]); | |
}; |
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
<?xml version='1.0' encoding='utf-8'?> | |
<plugin id="maxim-kolmogorov-echo-test" version="0.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android"> | |
<name>EchoTest</name> | |
<js-module name="EchoTest" src="www/EchoTest.js"> | |
<clobbers target="echotest" /> | |
</js-module> | |
</plugin> |
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
import Vue from "vue" | |
Vue.directive('phone', { | |
bind(el) { | |
el.oninput = function(e) { | |
if (!e.isTrusted) { | |
return | |
} | |
const x = this.value.replace(/\D/g, '').match(/(\d{0,1})(\d{0,3})(\d{0,3})(\d{0,4})/) |
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
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "Organization", | |
"url": "http://www.example.com", | |
"logo": "http://www.example.com/images/logo.png" | |
} | |
</script> |
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
[ | |
{ "from": "/old", "to": "https://new-site.ru" }, | |
{ "from": "/old2", "to": "/new" } | |
] |
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 | |
$secret = 'ВАШ_СЕКРЕТНЫЙ_КЛЮЧ'; | |
$params = array( | |
'secret' => $secret, | |
'response' => $_SESSION['recaptcha_token'], | |
); | |
$myCurl = curl_init(); | |
curl_setopt_array($myCurl, array( |
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 ($_SERVER["REQUEST_METHOD"] == "POST") { | |
session_start(); | |
$_POST = json_decode(file_get_contents('php://input'), true); | |
$_SESSION['recaptcha_token'] = $_POST['token']; | |
} else { | |
http_response_code(404); | |
header('Location: /404.html'); | |
exit; | |
} |