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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install nginx | |
sudo apt-get install mysql-server mysql-client | |
sudo apt-get install php7.4 php7.4-fpm php7.4-mysql |
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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install apache2 | |
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql | |
sudo apt-get install mysql-server mysql-client |
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
<title>[[*longtitle:isnot=``:then=`[[*longtitle]]`:else=`[[*pagetitle]]`]]</title> |
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 | |
$username = 'vasya'; | |
$password = 'qwerty'; | |
$email = '[email protected]'; | |
$sudo = true; | |
require 'config.core.php'; | |
require MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
if ((!$modx) || (!$modx instanceof modX)) { |
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 | |
add_action( 'wp_print_styles', function() | |
{ | |
wp_styles()->add_data( 'jet-smart-filters-inline-css', 'after', '' ); | |
} ); | |
add_action( 'init', 'remove_my_style_stylesheet', PHP_INT_MAX ); | |
function remove_my_style_stylesheet() { | |
wp_deregister_style( 'jet-smart-filters-inline-css' ); | |
} | |
add_action( 'wp_enqueue_scripts', function() { |
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 | |
//отключаем параметры доставки по стране | |
add_filter( 'woocommerce_cart_needs_shipping', 'woocommerce_disable_shipping' ); | |
function woocommerce_disable_shipping() { | |
return false; | |
} | |
//отключаем параметры оплаты | |
add_filter( 'woocommerce_cart_needs_payment', 'woocommerce_disabled_payment' ); | |
function woocommerce_disabled_payment() { | |
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
document.querySelector('form').addEventListener('submit', (e) => { | |
e.preventDefault() | |
const data = Object.fromEntries(new FormData(e.target).entries()); | |
console.log(data) | |
}); |
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
window.location.replace('https://aletoropov.ru'); |
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
# Редирект с http на https | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] | |
# Конец редиректа |
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
#!/bin/bash | |
echo "Update & clean system..." | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt autoclean | |
sudo apt clean | |
sudo apt autoremove | |
sudo snap set system refresh.retain=2 | |
dpkg -l | awk '/^rc/ {print $2}' | xargs sudo dpkg --purge |
OlderNewer