This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
async function handleRequest(request) { | |
const url = new URL(request.url) | |
// Serve robots.txt file | |
if (url.pathname === '/robots.txt') { | |
return new Response('User-agent: *\nDisallow: ', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REMINDER: Replace YOUR_API_KEY with your actual Anthropic API key | |
const ANTHROPIC_API_KEY = 'YOUR_API_KEY'; | |
const ANTHROPIC_API_URL = 'https://api.anthropic.com/v1/messages'; | |
/** | |
* Generates a response using Claude via the Anthropic API. | |
* | |
* @param {string} prompt - The input prompt for Claude. | |
* @return {string} The generated response from Claude. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function queryOpenAIChatCompletion(userMessage) { | |
var apiKey = 'API_KEY'; // Replace with your actual API key | |
var url = 'https://api.openai.com/v1/chat/completions'; | |
var payload = { | |
model: "gpt-4o-mini", | |
messages: [ | |
{"role": "user", "content": userMessage} | |
], | |
temperature: 0.4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generate content using the Gemini API with a hardcoded API key. | |
* @param {string} prompt - The text prompt to generate content. | |
* @return {string} The generated text from the API. | |
*/ | |
function generateGeminiContent(prompt) { | |
const API_KEY = 'API_KEY'; // Replace with your actual API key | |
const API_URL = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-001:generateContent?key=' + API_KEY; | |
const requestBody = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Be highly organized. | |
- Suggest proactive solutions and anticipate my needs. | |
- Treat me as an expert in all subject matter. | |
- Be accurate and thorough; mistakes erode my trust. | |
- Provide detailed explanations; I appreciate lots of detail. | |
- Value good arguments over authorities; the source is irrelevant. | |
- Consider new technologies and contrarian ideas. | |
- High levels of speculation or prediction are fine; just flag it. | |
- Recommend only the highest-quality, meticulously designed products. | |
- Recommend products from all over the world; location is irrelevant. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkLink(url, domain) { | |
try { | |
var response = UrlFetchApp.fetch(url, {muteHttpExceptions: true}); | |
var content = response.getContentText(); | |
// Create a regular expression to match links to the specified domain | |
var regex = new RegExp('href=["\']https?:\/\/(www\.)?' + domain.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'i'); | |
// Check if the content contains a link matching the regex | |
return regex.test(content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { var titulos = document.querySelectorAll(".FAxxKc, .yzifAd, .WBi6vc, .I0UMhf"); titulos.forEach(titulo => { titulo.parentElement.parentElement.style.filter = 'blur(5px)'; });})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var schemas = document.querySelectorAll('script[type="application/ld+json"]'); | |
var newsSchema = null; | |
schemas.forEach(function(schema) { | |
var json = JSON.parse(schema.innerText); | |
if (json['@type'] === 'NewsArticle') { | |
newsSchema = json; | |
} | |
}); | |
if (newsSchema) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function()%7B window.open(%27https://www.semrush.com/info/%27%2Blocation.host)%7D)()%3B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:!function(){let e=Array.from(document.querySelectorAll("a")).map(e=>new URL(e.href,window.location.origin).href).filter(e=>{try{return new URL(e).origin===window.location.origin&&!e.includes("#")}catch(t){return console.error(%60Error parsing URL: ${e}%60),!1}});e=Array.from(new Set(e));let t=window.location.origin+"/robots.txt";fetch("https://tools.estevecastells.com/api/bulk-robots-txt/v1",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({robots_txt_url:t,links:e})}).then(e=>e.json()).then(e=>{let o="box-"+Math.random().toString(36).substr(2,9),r=document.createElement("div");r.attachShadow({mode:"open"});let n=document.createElement("div");if(n.style="position:fixed;bottom:5px;right:5px;background-color:white;width:300px;padding:10px;border:1px solid grey;z-index:9999;",n.id=o,document.body.appendChild(r),r.shadowRoot.appendChild(n),e.error)n.innerHTML=%60<span style="position:absolute;right:5px;top:0px;cursor:pointer;padding:0 4px;background-color:white;" id="close |
NewerOlder