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
# Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-36-generic x86_64) | |
# (из коробки) OpenSSL 1.1.0g 2 Nov 2017 | |
# (из коробки) curl 7.58.0 (x86_64-pc-linux-gnu) | |
# PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS ) | |
# Компилим GOST-engine | |
sudo apt install cmake libssl-dev | |
git clone --branch=openssl_1_1_0 https://github.com/gost-engine/engine.git gost-engine/engine | |
cd gost-engine/engine | |
cmake . |
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
var link = document.querySelectorAll("a.action-show-number")[0]; | |
var href = link.getAttribute('href'); | |
var request = new XMLHttpRequest(); | |
request.open('GET', href + '?async', true); | |
request.onload = function() { | |
var data = JSON.parse(request.responseText) | |
console.log(data.phone); | |
}; | |
request.send(); |
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 | |
//Реализовать интерфейс: | |
interface ChangelogInterface | |
{ | |
public function getCurrentTag(); // Получить последнюю по дате версию | |
public function getChangelog(); // Получить многомерный ассоц. массив для передачи в шаблонизатор, при этом изменив формат даты на d.m.Y | |
} | |
/* Для обработки файла вида: | |
<?xml version="1.0" encoding="utf-8"?> |
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
// Нужно написать Jquery-плагин: | |
// По клику на кнопку сделать запрос по переданному аргументом url, получить json данные (см. ниже) | |
// И отобразить их в виде таблицы внутри Bootstrap modal-окна, при этом изменив формат даты на "d.m.Y" | |
{ | |
"items": [ | |
{ | |
"id" : 1, | |
"date" : "2016-02-18", | |
"title" : "Item 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
<?php | |
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; | |
$encoder = new MessageDigestPasswordEncoder(); | |
echo $encoder->encodePassword('foo', ''); | |
// 5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg== |