Skip to content

Instantly share code, notes, and snippets.

View olawanlejoel's full-sized avatar
:dependabot:
Building...

Joel Olawanle olawanlejoel

:dependabot:
Building...
View GitHub Profile
@olawanlejoel
olawanlejoel / gist:76701f8ba7f8a6abbdec4791b02e7ad7
Created September 22, 2025 14:20
Pruned Kinsta API OpenAPI 3.1.0 specification for use with Custom GPT actions.
openapi: 3.1.0
info:
title: Kinsta API (Pruned for Custom GPT)
version: 1.0.2
description: Subset of Kinsta API excluding Applications, Databases, and Static Sites.
servers:
- url: https://api.kinsta.com/v2
security:
now we are more focused on the dev mode and not the AI mode. but here is the issue we experience. when we scrape on headless: true, we experience this thing where we get the parameter to be injected but i dont know if it injects but it ends up not solving. but when we set headless to false then it scrapes
Edit
Relevant chats
I see the issue! This is a common problem with Cloudflare Turnstile captchas in headless mode. Let me analyze what's happening:
The Problem
When headless: true, you're getting the Turnstile parameters intercepted correctly, but the captcha isn't actually being solved. When headless: false, it works fine. This suggests a few potential issues:
<?php
/**
* Plugin Name: Font Weight Options
* Description: Manage custom font weights for body text, headings, and code elements.
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// ...existing code...
useEffect(() => {
if (typeof window === 'undefined') return; // Prevent SSR issues
if (hasRestored.current) return;
const activeJobId = localStorage.getItem("spidra-active-job");
if (activeJobId) {
try {
const parsed = JSON.parse(activeJobId);
@olawanlejoel
olawanlejoel / script.sh
Created January 14, 2025 14:25
Updating plugins across multiple sites with Kinsta API — shell scripting
update_plugin_across_sites() {
PLUGIN_NAME=$1
if [ -z "$PLUGIN_NAME" ]; then
echo "Error: Plugin name is required."
echo "Usage: $0 update-plugin <plugin_name>"
return 1
fi
echo "Fetching all sites in the company..."
/*
Theme Name: Kinsta Blog Theme
Author: Joel Olawanle
Author URI: https://kinsta.com/blog/author/joelolawanle/
Description: A thoughtfully designed WordPress theme crafted specifically for illustrating the process of theme creation. This theme provides a clean, responsive layout suitable for showcasing articles and tutorials, making it an ideal choice for blog posts and educational content related to web development and design.
Version: 1.0
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
@olawanlejoel
olawanlejoel / setup.dockerfile
Last active September 6, 2022 15:34
docker-compose
docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:0.15.3
@olawanlejoel
olawanlejoel / App.js
Created July 13, 2022 21:25
How To Perform GET HTTP Request in React’s Functional Component With Fetch API
import { useState, useEffect } from "react";
const App = () => {
const [posts, setPosts] = useState([]);
useEffect(() => {
fetch("https://jsonplaceholder.typicode.com/posts")
.then((res) => res.json())
.then((data) => {
console.log(data);
@olawanlejoel
olawanlejoel / App.js
Created July 13, 2022 21:22
How To Perform GET HTTP Request in React’s Functional Component With Axios
import { useState, useEffect } from "react";
// import axios library - make sure you install it using - npm i axios
import axios from "axios";
const App = () => {
const [posts, setPosts] = useState([]);
useEffect(() => {
axios
@olawanlejoel
olawanlejoel / App.js
Last active July 13, 2022 21:18
How To Perform GET HTTP Request in React’s Class Component With Fetch API
import React, { Component } from "react";
class App extends Component {
constructor(props) {
super(props);
this.state = {
posts: []
};
}