Skip to content

Instantly share code, notes, and snippets.

View peixotorms's full-sized avatar

Raul P. peixotorms

  • France
  • 16:45 (UTC +02:00)
View GitHub Profile
@jrevillini
jrevillini / lazy-elementor-background-images.php
Last active June 22, 2022 16:31
lazyload elementor background images
<?php
// NEWS!!! NEWS!!! **** FEBRUARY 2020 //
// I rolled this code into a plugin!
// Download plugin Lazy Load Background Images for Elementor. Link is in comments below.
// Or go to https://james.revillini.com/projects/
// if you don't want another plugin, the code below works (last time I checked)
@ikawka
ikawka / cloudflare-trace.js
Last active December 31, 2023 12:29
Trace current user's location via javascript with CloudFlare provided the /cdn-cgi/trace is enabled.
(function($){
$(function(){
$.ajax({
contentType: 'application/text; charset=utf-8',
crossBrowser: true,
type: 'GET',
url: '/cdn-cgi/trace',
}).done(function(d){
var data = d.replace(/[\r\n]+/g, '","').replace(/\=+/g, '":"');
data = '{"' + data.slice(0, data.lastIndexOf('","')) + '"}';
@dodyw
dodyw / findbot.pl
Last active October 11, 2019 10:30
Perl script to find suspicious scripts. This script is taken from http://cbl.abuseat.org/findbot.pl
#!/usr/bin/perl
# The above line may need to be changed to point at your version of Perl
#
# This script attempts to find malicious files/scripts on your machine.
# It specifically looks for spambots that we're aware of, as well
# as "suspicious" constructs in various scripting languages.
#
# Normally it should be run as root.
#
# By default, findbot.pl scans the directories /tmp, /usr/tmp, /home and