- #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
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 | |
/** | |
* | |
* Scripts and actions to optimize WordPress | |
* | |
*/ | |
// Remove block editor | |
add_filter( 'use_block_editor_for_post', '__return_false' ); |
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
<!-- Google Analytics --> | |
<script async>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXXXX'); | |
<!--<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>--> | |
<!-- Yandex Metrica --> | |
<script async>(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); ym(XXXXXX, "init", {}); | |
<!--<noscript><img src="https://mc.yandex.ru/watch/XXXXXX" style="position:absolute; left:-9999px;" alt=""></noscript>--> |
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( | |
'wp_schema_pro_schema_article', | |
/** | |
* Расширяет микроразметку BlogPosting для Яндекс.Метрики. | |
* | |
* @link https://metrika.yandex.ru/support/metrica/publishers/schema-org/json-ld.html#json-ld__identifier-desc | |
* | |
* @param array $schema Схема. | |
* @param array $data Данные. |
https://chat.openai.com/?model=gpt-4-browsing
You:
Please tell me about yourself, and your capabilities.
ChatGPT:
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 | |
/** | |
* Inpspired by Scott Jehl: https://www.filamentgroup.com/lab/load-css-simpler/ | |
* | |
**/ | |
add_action( 'style_loader_tag', 'async_preload_stylesheets', 99, 4 ); | |
function async_preload_stylesheets( string $tag, string $handle, string $href, string $media ) : string { | |
// Add the stylesheet handles you want to load async | |
$allowlist = [ 'your-stylesheet-handle' ]; |
Some questions about frontend development that might be in your next job interview. The questions were formulated by @mauvieira, a super senior fullstack developer
-
What are the strategies we can use to optimize the performance of web applications?
- CDNs, GraphQL (maybe) to reduce overfetching, improve backend performance, use SSR and/or SSG, lazy loading for loading assets only when it's needed, minimize and compress HTML, CSS and JS files, and optimize images by compressing and resizing them.
-
What are Web Vitals (LCP, FID, CLS)? And how are they applied in the real world?
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 | |
/** | |
* Optimize Loading Separate Core Block Assets in Classic Themes Plugin. | |
* | |
* @package OptimizeLoadingSeparateCoreBlockAssetsInClassicThemes | |
* @author Weston Ruter | |
* @link https://gist.github.com/westonruter/25187db63a7666f08b151ca53497ffb5 | |
* @license GPL-2.0-or-later | |
* @copyright 2023 Google Inc. | |
* |
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 | |
/** | |
* Plugin Name: Elementor Activation | |
* Description: Activates Elementor Pro - Not everybody have shell acces to run WP CLI or desire for eveybody to see license key. Manual activation is needed, and since Elementor wont add this, community will :) | |
* Plugin URI: https://github.com/elementor/elementor/issues/8667 | |
* Gist Plugin URI: https://gist.github.com/lupetalo/38e6d40b620b7da976c42c2d207c674a | |
* Version: 1.3 | |
*/ | |
add_filter('pre_http_request', function($request, $request_params, $url){ | |
if (strpos($url, 'my.elementor.com/api/v2/license/')!==false){ |