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
# chat About you Code ( Ctrl + Alt + I ) | |
# Make changes using natural language ( Ctrl + Shift + Alt + I ) |
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 | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
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
# create api key | |
https://www.bing.com/indexnow/getstarted | |
# upload indexnow-api-key-file.txt to your website with content 'indexnow-api-key' | |
# indexnow.org | |
https://api.indexnow.org/indexnow?url=https://site.net/page-url/&key=indexnow-api-key | |
# bing.com | |
https://www.bing.com/indexnow?url=https://site.net/page-url/&key=indexnow-api-key |
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
editor.windowManager.open({ | |
title: 'Options', | |
body: [ | |
{ | |
type : 'listbox', | |
name : 'imgalign', | |
label : 'Image direction', | |
values : [ | |
{ text: 'Image right', value: 'right' }, |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
} |
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
<script> | |
function loadScript(url) { | |
let isLoaded = document.querySelectorAll('.search-script'); | |
if(isLoaded.length > 0) { return; } | |
let myScript = document.createElement("script"); | |
myScript.src = url; | |
myScript.async = 'async'; | |
myScript.className = 'search-script'; | |
document.head.appendChild(myScript); | |
} |
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
function add_lazy_loading_to_images($content) { | |
// Add loading="lazy" to all <img> tags in the content | |
$content = preg_replace('/<img(.*?)src=(["\'])(.*?)\2(.*?)>/i', '<img$1loading="lazy" src=$2$3$2$4>', $content); | |
return $content; | |
} | |
add_filter('the_content', 'add_lazy_loading_to_images'); |
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
<IfModule mod_expires.c> | |
ExpiresActive On | |
# Images | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType image/webp "access plus 1 year" | |
ExpiresByType image/avif "access plus 1 year" | |
ExpiresByType image/avif-sequence "access plus 1 year" |
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
# Install Node.js and npm | |
sudo apt update | |
sudo apt install nodejs | |
sudo apt install npm | |
# Install Cordova | |
sudo npm install -g cordova | |
# Create a Cordova Project | |
cordova create MyAndroidApp |
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
export APACHE_RUN_USER=username | |
export APACHE_RUN_GROUP=www-data | |
sudo adduser username www-data |
NewerOlder