- #rus #5min 5-минутное введение
- #rus #10min 10-минутное введение от Droider
- #rus #60min 33 запроса ChatGPT для начинающих
- #eng #34min ChatGPT Tutorial - A Crash Course on Chat GPT for Beginners
- #eng #47min «ChatGPT for Beginners: The Ultimate Use Cases for Everyone» от Udemy
- #eng #2h ChatGPT for Beginners
This file contains hidden or 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
| # Install dependencies | |
| # | |
| # * checkinstall: package the .deb | |
| # * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
| # * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
| apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
| mkdir -p ~/sources/ && \ | |
| # Compile against OpenSSL to enable NPN |
This file contains hidden or 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
| class ActivityTracker { | |
| constructor(totalTime, checkTime, metrikaId, debug = false) { | |
| this.events = [ | |
| "touchmove", | |
| "blur", | |
| "focus", | |
| "focusin", | |
| "focusout", | |
| "load", | |
| "resize", |
This file contains hidden or 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
| /** | |
| * | |
| * redirect to homepage if has non "edit_posts" capabilities | |
| */ | |
| add_filter("admin_init", function () { | |
| if (!current_user_can('edit_posts')) { | |
| wp_redirect(WP_HOME); | |
| exit; |
This file contains hidden or 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
| /** Ожидание загрузки счетчика Яндекс.Метрики | |
| * @param {?(number|string)} ymCounterNum - номер счетчика, если известен | |
| * @param {function} callback - получает аргументами объект и номер счетчика | |
| * @param {number} interval - интервал проверки готовности счетчика | |
| */ | |
| function waitForYm(ymCounterNum, callback, interval) { | |
| if (!callback) return; | |
| if (!ymCounterNum) { | |
| let metrikaObj = (window.Ya && (window.Ya.Metrika || window.Ya.Metrika2)) || null; | |
| ymCounterNum = (metrikaObj && metrikaObj.counters && (metrikaObj.counters() || [0])[0].id) || 0; |
This file contains hidden or 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
| Также необходимо внести правки в catalog/view/javascript/common.js | |
| найти функцию cart.add | |
| после if (json['success']) { | |
| добавить sendYandexEcommerce(json, "add"); | |
| найти функцию cart.remove после success: function(json) { | |
| добавить sendYandexEcommerce(json, "remove"); |
This file contains hidden or 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
| //Please ask Hatch to provide a list of all retailer IDs vs names | |
| const retailer_mapping = { | |
| 94349 : 'MSI Store', | |
| 89105 : 'Walmart', | |
| }; | |
| //Listener on any hatch links | |
| document.addEventListener( "click", hatchRetailerWidgetClick ); | |
| function hatchRetailerWidgetClick(ev){ | |
| const el = ev.target; |
This file contains hidden or 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
| import VideoEvents from '@src/metrics/video_events'; | |
| import logger from '@src/shared/logger'; | |
| /** | |
| * Custom Dimensions Map that is required for UA events with gtag | |
| * This mapping is not required for GA4 | |
| */ | |
| const concertCustomDimensionMap = { | |
| 'dimension1': 'video_id', | |
| 'dimension2': 'video_length', |
This file contains hidden or 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('autoptimize_filter_imgopt_lazyload_cssoutput', function($string) { | |
| ob_start(); | |
| ?> | |
| <script>document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend","<?= $string ?>");</script> | |
| <?php | |
| return ob_get_clean(); | |
| }); |
This file contains hidden or 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 | |
| /** | |
| * Builds the dataLayer and loads GTM tracking in the head. | |
| * Includes Custom Dimensions and Ecommerce data. | |
| * | |
| */ | |
| function pmpro_add_google_tag_manager_to_head() { | |
| global $pmpro_pages; | |
| // Don't track admins. |