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 | |
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors', 0); | |
ini_set('log_errors', 'on'); | |
ini_set('error_log', __DIR__ . DIRECTORY_SEPARATOR . 'error_log.txt'); |
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
ssh-keygen -t rsa -C "[email protected]" -f ~/.ssh/id_rsa -P "" | |
cat ~/.ssh/id_rsa.pub |
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 |
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
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
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
<?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
<?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 | |
$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
<title>[[*longtitle:isnot=``:then=`[[*longtitle]]`:else=`[[*pagetitle]]`]]</title> |
NewerOlder