Skip to content

Instantly share code, notes, and snippets.

View rilexz's full-sized avatar
:shipit:
heh

Bobby Riley rilexz

:shipit:
heh
View GitHub Profile
@rilexz
rilexz / rgb.html
Last active December 6, 2023 17:30
rgb font
svg(width='0' height='0')
filter#f(x='-50%' y='-200%' width='200%' height='500%')
//- blurred copy
feGaussianBlur(stdDeviation='35')
//- bump saturation
feColorMatrix(type='saturate' values='1.3')
//- slap original on top of blurred & saturated copy
feComposite(in='SourceGraphic')
//- no text duplication
@rilexz
rilexz / disable-comments.php
Last active December 6, 2023 17:16
disable comments in wp cms
<?php
add_action('admin_init', function () {
// redirect user trying to access
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_safe_redirect(admin_url());
exit;
}
@rilexz
rilexz / requirements.py
Last active December 6, 2023 17:17
Facebook bot website integration
//
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
<?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 October 10, 2023 14:21
My example of wp functions for optimization for any framework
/*
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
#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