Skip to content

Instantly share code, notes, and snippets.

Установка Composer на OpenServer

cd modules/php/PHP-7.0-x64/

Проверка в \OSPanel\userdata\config\PHP-7.0-x64_php.ini "extension=php_openssl.dll"

php -r "readfile('https://getcomposer.org/installer');" | php

php composer.phar -V

@nikitos-one
nikitos-one / Request.php
Last active June 9, 2021 07:31
CURL PHP Request
<?php
class Request
{
public static function query($requestMethod, $requestUrl, $requestData='', $requestHeader='')
{
$curl=curl_init();
$curl_param = [
CURLOPT_SSL_VERIFYHOST => 0,
@nikitos-one
nikitos-one / shake.css
Created May 11, 2020 13:19
“Shake” CSS Keyframe Animation
.shake:hover {
animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
perspective: 1000px;
}
@keyframes shake {
10%, 90% {
transform: translate3d(-1px, 0, 0);
@nikitos-one
nikitos-one / true-false.js
Created April 23, 2020 12:30
Switching values true / false (Переключение значений true / false)
value = value ? false : true;
@nikitos-one
nikitos-one / currency-format.js
Created April 23, 2020 12:28
Correct formatting of currency values (Правильное форматирование денежных значений)
price.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$& ');