Skip to content

Instantly share code, notes, and snippets.

View gr1zix's full-sized avatar
🎯
Focusing

Grizix gr1zix

🎯
Focusing
View GitHub Profile
@gr1zix
gr1zix / ba.sh
Created January 8, 2024 20:27 — forked from bvolpato/ba.sh
Install Chrome Driver with Xvfb (Ubuntu Server)
#!/bin/bash
# Chrome Repo
sudo apt-get install fonts-liberation xdg-utils libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get update
# Download
@gr1zix
gr1zix / robots.txt
Created October 30, 2023 15:02
Wordpress robots.txt basic
User-agent: *
Disallow: /cgi-bin
Disallow: /?
Disallow: /admin/
Disallow: /login/
Disallow: /wp-
Disallow: *?p=
Disallow: *?s=
Disallow: *&s=
Disallow: /search/
@gr1zix
gr1zix / index.html
Created September 12, 2021 21:08
Async custom or external scripts & styles loading which need to be used after website interact (Best way to load big files like lottie scenes on Base64 stored in json which have size ~10M)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript">
// Async custom or external scrips & styles loading
(function() {
var lazyLoaded = false;
@gr1zix
gr1zix / index.html
Last active September 12, 2021 20:57
Google and custom fonts async loading
<!DOCTYPE html>
<html lang="en" class="fonts-loading">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript">
// Lib: https://github.com/typekit/webfontloader
// Async font loading
WebFontConfig = {
@gr1zix
gr1zix / functions.php
Last active September 13, 2021 11:02
Wordpress brutforce security and prevent username visibility
<?php
/** Disable XML-RPC - is a URL which hacher always used in first for Brute-Force attacks website with no using auth form */
add_filter('xmlrpc_enabled', '__return_false');
/** Hide username from comments */
function remove_comment_author_class( $classes ) {
foreach( $classes as $key => $class ) {
if(strstr($class, "comment-author-")) {
unset( $classes[$key] );
@gr1zix
gr1zix / functions.php
Last active September 13, 2021 11:02
Elementor register scripts on elementor template to overwrite the theme defaults
<?php
if (!function_exists('app_get_theme_version')) {
function app_get_theme_version() {
$theme_info = wp_get_theme();
if ( is_child_theme() ) {
$theme_info = wp_get_theme($theme_info->parent_theme);
}
$theme_version = $theme_info->display('Version');
@gr1zix
gr1zix / app.css
Created September 7, 2021 08:54
Elementor register custom font (Font will be listed on Elementor fonts selector)
/* Enabling font which stored on fonts/ folder */
@font-face {
font-family: 'Organetto';
src: url('fonts/Organetto-Light.eot');
src: local('Organetto Light'), local('Organetto-Light'),
url('fonts/Organetto-Light.eot?#iefix') format('embedded-opentype'),
url('fonts/Organetto-Light.woff2') format('woff2'),
url('fonts/Organetto-Light.woff') format('woff'),
url('fonts/Organetto-Light.ttf') format('truetype'),
url('fonts/Organetto-Light.svg#Organetto-Light') format('svg');
@gr1zix
gr1zix / phpmyadmin.conf
Last active March 23, 2020 01:03
phpmyadmin
location /phpmyadmin {
#Auth
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/pma_pass;
expires modified +310s;
#Context
root /usr/share/;
@gr1zix
gr1zix / readme.md
Created December 30, 2018 10:44
[VPS, Hosting] Services
@gr1zix
gr1zix / editors.md
Created November 5, 2018 19:54
Vue JS html, text, WYSIWYG editor list