Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
heh

Bobby Riley rilexz

:shipit:
heh
View GitHub Profile
@rilexz
rilexz / requirements.txt
Created May 9, 2023 17:31
Facebook bot website integration
View requirements.txt
//
run command in terminal
//
pip install -r requirements.txt
/*
Setting up first flask server
*/
from flask import Flask
@rilexz
rilexz / su-elementor.php
Created September 20, 2022 22:08
Added more to speed-up functions for elementor framework
View su-elementor.php
<?php
// disable google fonts
add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );
// add font-display swap to elementor custom fonts
add_filter( 'elementor_pro/custom_fonts/font_display', function( $current_value, $font_family, $data ) {
return 'swap';
// you can also play also with $current_value & $font_family for specific requirments
}, 10, 3 );
@rilexz
rilexz / functions.php
Last active September 20, 2022 22:02
My example of wp functions for optimization for any framework
View functions.php
/*
DO NOT COPY\PASTE entirety. Take only what you need.
The following code is just a few **examples** of some optimizations that you can do in
the functions.php file of any framework of your choosing
*/
<?php
// disable google fonts
@rilexz
rilexz / .htaccess
Last active September 20, 2022 21:58
My example of wp .htaccess for several optimization without needing 3rd party plugins
View .htaccess
#DO NOT COPY\PASTE entirely into your .htaccess. Take only what you need. Thx
#The following code is just a few **examples** of optimizations that you can do in .htaccess file.
# HTTPS forced
<IfModule mod_rewrite.c>
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off