Skip to content

Instantly share code, notes, and snippets.

aasb = Unknown
action = Unknown
ad = Unknown
addh = Unknown
adsafe = Unknown
adtest = Ads test mode (when adtest=on, Google treats the query as a test so ad impressions aren’t counted)
adtest-useragent = Unknown
aec = Unknown
aep = Unknown
affdom = Unknown
@thetafferboy
thetafferboy / aa-unanswered.js
Last active April 6, 2025 10:27
AlsoAsked Unanswered Questions (Screaming Frog)
// AlsoAsked Unanswered Questions
// Note: Best used with Screaming Frog "List" mode and given a list of informational / blog pages
//
//
// IMPORTANT:
// You will need to supply your ChatGPT and AlsoAsked API key below.
// These will be stored as part of your SEO Spider configuration in plain text.
// Also be mindful if sharing this script that you will be sharing your API key
{
"version": 1,
"snippets": [
{
"version": 1,
"javascript": "const settings \u003d {\\r\\n chatGpt: {\\r\\n \\/\\/ replace with your ChatGPT API key created at https:\\/\\/platform.openai.com\\/api-keys\\r\\n apiKey: \\\u0027ENTER CHATGPT API KEY\\\u0027,\\r\\n\\r\\n \\/\\/ the OpenAI model to use\\r\\n model: \\\u0027gpt-4-turbo\\\u0027,\\r\\n },\\r\\n alsoAsked: {\\r\\n \\/\\/ replace with your AlsoAsked API key created at https:\\/\\/alsoasked.com\\/developer\\/keys\\r\\n apiKey:\\r\\n \\\u0027ENTER ALSOASKED API KEY\\\u0027,\\r\\n\\r\\n \\/\\/ the language to search in\\r\\n language: \\\u0027en\\\u0027,\\r\\n\\r\\n \\/\\/ the region to search in\\r\\n region: \\\u0027gb\\\u0027,\\r\\n\\r\\n \\/\\/ the depth of the search\\r\\n \\/\\/ 2 is the default and returns the smallest number of questions, and costs 1 credit\\r\\n \\/\\/ 3 is the maximum and returns the largest number of questions, but costs 4 credits\\r\\n depth: 2,\\r\\n\\r\\n
const settings = {
chatGpt: {
// replace with your ChatGPT API key created at https://platform.openai.com/api-keys
apiKey: 'CHAT GPT API KEY HERE',
// the OpenAI model to use
model: 'gpt-4-turbo',
},
alsoAsked: {
// replace with your AlsoAsked API key created at https://alsoasked.com/developer/keys
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
// Fetch the original content
const originalResponse = await fetch(request)
const originalHtml = await originalResponse.text()
// Send the content to the ChatGPT API for language identification
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const originalResponse = await fetch(request)
const originalHtml = await originalResponse.text()
const url = new URL(request.url)
const nftMetadata = await fetchNFTMetadata(url.pathname)
from web3 import Web3
import json
infura_url = 'https://mainnet.infura.io/v3/your_project_id'
web3 = Web3(Web3.HTTPProvider(infura_url))
if not web3.isConnected():
print("Failed to connect to Ethereum network!")
exit()
from web3 import Web3
import json
# Connect to Ethereum network
infura_url = 'https://mainnet.infura.io/v3/your_project_id'
web3 = Web3(Web3.HTTPProvider(infura_url))
# Check if connected to Ethereum
if not web3.isConnected():
print("Failed to connect to Ethereum network!")
@thetafferboy
thetafferboy / flag_getter.py
Last active May 3, 2024 20:39
hreflang flag getter for pi
from selenium import webdriver
from bs4 import BeautifulSoup
import requests
import os
from flag_recognition import recognize_flag, is_flag
from config import CHROMEDRIVER_PATH, STARTING_URL
# Configure WebDriver for Chrome
options = webdriver.ChromeOptions()
options.add_argument('headless')
@thetafferboy
thetafferboy / cse.py
Created October 18, 2023 11:17
Connect to Google CSE and get title and URL of top 10 results
import requests
def get_top_10_search_results(query, api_key, cx):
endpoint = "https://www.googleapis.com/customsearch/v1"
params = {
'q': query,
'key': api_key,
'cx': cx,
'num': 10
}