Skip to content

Instantly share code, notes, and snippets.

View estevecastells's full-sized avatar
🎯

Esteve Castells estevecastells

🎯
View GitHub Profile
@estevecastells
estevecastells / bookmarklet_robots_txt.js
Last active August 4, 2023 07:44
Bookmarklet - Visualize URLs blocked by Robots.txt in a page
javascript:(function(){
let links = Array.from(document.querySelectorAll('a'))
.map(a => new URL(a.href, window.location.origin).href)
.filter(url => {
try {
let urlObj = new URL(url);
return urlObj.origin === window.location.origin && !url.includes('#');
} catch (err) {
console.error(`Error parsing URL: ${url}`);
return false;
@estevecastells
estevecastells / permutation_at_scale.py
Last active April 23, 2023 15:21
Script to generate permutations of two elements at scale
import itertools
import csv
# Function to read elements from the CSV file
def read_elements(file_path):
with open(file_path, 'r', encoding='utf-8') as csvfile:
reader = csv.reader(csvfile)
elements = [row[0] for row in reader]
return elements
@estevecastells
estevecastells / gist:84459cd1c720afc0d1b6719c8499eda8
Created February 17, 2023 22:04
Download Giphy GIFs to Desktop
curl https://media.giphy.com/media/3jcgPn9fzfaXc1EHJC/giphy.gif --output ~/Desktop/download.gif
// Change 3jcgPn9fzfaXc1EHJC for your GIFs URL
javascript: (function () { var titulos = document.querySelectorAll(".FAxxKc, .yzifAd, .WBi6vc, .I0UMhf"); titulos.forEach(titulo => { titulo.parentElement.parentElement.style.filter = 'blur(5px)'; });})();
javascript:(function(){ window.location.href='https://12ft.io/proxy?q=%27+encodeURIComponent(location.href); })();
### Select Submitted sitemaps in GSC with a CSS class to export them without having to manually copy paste - it can be that the class name in itself changes so check since it's dynamic to avoid scraping by GSC
//*[contains(@class, 'XgRaPc AB6Eee RVEMNe XL1mme')]
@estevecastells
estevecastells / Console function to select all checkboxes in a page
Created March 18, 2022 10:36
Console function to select all checkboxes in a page
(function() {
var aa = document.querySelectorAll("input[type=checkbox]");
for (var i = 0; i < aa.length; i++){
aa[i].click();
}
})()
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^old\.info$ [OR]
RewriteCond %{HTTP_HOST} ^www\.old\.info$
RewriteRule (.*)$ https://new.com/path/$1 [R=301,L]
</IfModule>
Function RegExCheck(objCell As Range, strPattern As String)
Dim RegEx As Object
Set RegEx = CreateObject("VBScript.RegExp")
RegEx.Global = True
RegEx.Pattern = strPattern
If RegEx.Replace(objCell.Value, "") = objCell.Value Then
RegExCheck = 0
Else
2 girls 1 cup|2g1c|4r5e|5h1t|5hit|5ht|666|@$$|a s s|a s shole|a55|a55hole|a_s_s|abbo|abeed|abuse|acrotomophilia|addicts|aeolus|africoon|ahole|alabama hot pocket|alaskan pipeline|alligator bait|alligatorbait|amcik|anal|analannie|analprobe|analsex|andskota|anilingus|anus|apeshit|ar5e|arabush|arabushs|areola|areole|argie|arian|armo|armos|aroused|arrse|arschloch|arse|arsehole|aryan|ash0le|ash0les|asholes|ass monkey|ass|ass-fucker|ass-hat|ass-pirate|assbag|assbagger|assbandit|assbang|assbanged|assbanger|assbangs|assbite|assblaster|assclown|asscock|asscowboy|asscracker|asses|assface|assfuck|assfucker|assfukka|assgoblin|assh0le|assh0lez|asshat|asshead|assho1e|asshole|assholes|assholz|asshopper|asshore|assjacker|assjockey|asskiss|asskisser|assklown|asslick|asslicker|asslover|assman|assmaster|assmonkey|assmunch|assmuncher|assnigger|asspacker|asspirate|asspuppies|assrammer|assranger|assshit|assshole|asssucker|asswad|asswhole|asswhore|asswipe|asswipes|auto erotic|autoerotic|ayir|azazel|azz|azzhole|b a s t a r d|b i t c