Post #1
But I must explain to you how all this mistaken idea of denouncing of a pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids […]
Сохранение настроек и сессий Putty
Экспорт. только сессии: regedit /e “%USERPROFILE%\Desktop\putty-sessions.reg” HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions все настройки: regedit /e “%USERPROFILE%\Desktop\putty.reg” HKEY_CURRENT_USER\Software\SimonTatham Импорт. Просто запускаем соответствующий файлик и соглашаемся на внесение изменений в реестр.
Смена порта RDP подключения
По умолчанию, подключение к удаленному рабочему столу (по протоколу RDP) происходит по порту TCP 3389. Для большей безопасности его можно изменить. Для этого в реестре нужно изменить ключ PortNumber по адресу: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
Kerio Control 9 – Enable RDP from Internet to Local PC
Задача: сделать возможным подключение RDP к компьютеру в локальной сети из Интернет, например, подключаться из дома к рабочему компьютеру. Правило: IP компьютера в локальной сети, к которому надо подключаться 192.168.10.40. Для подключения по RDP из дома вводим: xxx.xxx.xxx.xxx:4000, где xxx – внешний IP адрес сети за Kerio.
Cisco VPN Client on Windows 10 – Reason 442: Failed to enable Virtual Adapter
При попытке подключения к хосту выдается ошибка «Reason 442: Failed to enable Virtual Adapter». Решение: Открываем редактор реестра; Находим ветку «HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CVirtA»; Находим параметр «DisplayName»; Значение этого параметра содержит что-то вроде «oem4.inf,%CVirtA_Desc%;Cisco Systems VPN Adapter for 64-bit Windows». Необходимо изменить это значение, оставив только «Cisco Systems VPN Adapter for 64-bit Windows». После внесения изменений в реестр […]
Получить данные о продукте (ID, SKU, $) в Woocommerce из объекта $product
You have access to $product // Get Product ID $product->get_id(); (fixes the error: “Notice: id was called incorrectly. Product properties should not be accessed directly”) // Get Product General Info $product->get_type(); $product->get_name(); $product->get_slug(); $product->get_date_created(); $product->get_date_modified(); $product->get_status(); $product->get_featured(); $product->get_catalog_visibility(); $product->get_description(); $product->get_short_description(); $product->get_sku(); $product->get_menu_order(); $product->get_virtual(); get_permalink( $product->get_id() ); // Get Product Prices $product->get_price(); $product->get_regular_price(); $product->get_sale_price(); $product->get_date_on_sale_from(); […]
Добавление букв W H L к значениям размера товара в Woocommerce
Задача: По-умолчанию размер товара в Woocommerce отображается просто числами, например: “150x240x70”. Надо добавить к числам буквы, обозначающие длину, ширину и высоту, чтобы выглядело так: “L150 x W240 x H70 in” add_filter( ‘woocommerce_format_dimensions’, ‘custom_formated_product_dimentions’, 10, 2 ); function custom_formated_product_dimentions( $dimension_string, $dimensions ){ if ( empty( $dimension_string ) ) return __( ‘N/A’, ‘woocommerce’ ); $dimensions = array_filter( […]
Разрешить загрузку в медиа библиотеку WordPress разных типов файлов
Задача: сделать возможной загрузку в медиа библиотеку WordPress файлов любого типа. В примере разрешаем загрузку файлов с расширениями “doc”, “docx” и “pdf”. add_filter(‘upload_mimes’, ‘my_myme_types’, 1, 1); function my_myme_types($mime_types){ $mime_types[‘doc’] = ‘application/msword’; $mime_types[‘docx’] = ‘application/vnd.openxmlformats-officedocument.wordprocessingml.document’; $mime_types[‘pdf’] = ‘application/pdf’; return $mime_types; } Список MIME типов для всех типов файлов Расширение MIME Тип Название .123 application/vnd.lotus-1-2-3 Lotus […]