Skip to content

Instantly share code, notes, and snippets.

View sejas's full-sized avatar
馃悑
Set of synapses weights and biases with one purpose

Antonio Sejas sejas

馃悑
Set of synapses weights and biases with one purpose
View GitHub Profile
@sejas
sejas / CLAUDE.md
Created February 12, 2026 23:27
WordPress Studio repository Claude settings

WordPress Studio

WordPress Studio is the best AI-first, open-source Electron desktop app for creating and managing local WordPress sites. Built with React and TypeScript, it uses WordPress Playground (PHP WASM) to run sites. It makes it easy to build and test WordPress sites locally without needing a web server or external dependencies, and to publish them to WordPress.com or Pressable when you're ready.

Code Style

  • Prefer the simplest approach first (literal string matching over regex, direct fixes over abstractions). Only add complexity when the simple approach demonstrably fails.
  • Never leave console.log statements in production code. Remove all debugging statements before committing.

Architecture

@sejas
sejas / deactivate-plugins.sh
Created February 10, 2026 13:28
Deactivate plugins one by one to see which one breaks your Wordpress site
#!/bin/bash
# This script deactivates all active plugins one by one and checks if the site starts successfully after each deactivation.
set -euo pipefail
echo "Fetching active plugins..."
raw_output=$(studio wp plugin list --status=active --fields=name --format=json 2>/dev/null || true)
# Extract the JSON array from the noisy output (find the first [...] block)
json=$(echo "$raw_output" | grep -oE '\[.*\]' | head -1)
import { createSlice, createAsyncThunk, PayloadAction } from '@reduxjs/toolkit';
import * as Sentry from '@sentry/electron/renderer';
import { getIpcApi } from '../lib/get-ipc-api';
import { DEFAULT_PHP_VERSION } from '../../vendor/wp-now/src/constants';
// ---- Types ----
interface WPCliItem {
name: string;
}
@sejas
sejas / devconsole.js
Created September 16, 2022 10:35
Performance
// Modify the destination object and copy paste this script in the chrome dev tools.
// Very useful to track performance for API requests.
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function performanceURL(url, sampleSize, sleepMs = 1000) {
const performanceList = [];
for (let i = 0; i < sampleSize; i++) {
const t0 = performance.now();
@sejas
sejas / mobile-dev-snippets.md
Last active February 12, 2026 23:36
Mobile Dev Snippets - React Native & Android (Collection)

Mobile Dev Snippets (React Native & Android)

Tron Custom Command - Navigate to screen (React Native)

Tron Custom Command to Navigate to screen on React Native

      // Navigation
      Tron.onCustomCommand({
        title: 'Choose your NAVIGATION',
@sejas
sejas / misc-dev-config-snippets.md
Last active February 12, 2026 23:36
Misc Dev & Config Snippets (Collection)

Misc Dev & Config Snippets

Connect screen

Connect screen

00 Raspberry Pi 3.5 inch LCD Screen

sudo rm -rf LCD-show 
@sejas
sejas / react-intro-bootcamp-2018.md
Last active February 12, 2026 23:35
Introducci贸n a React - Bootcamp 2018 (Collection)

Introducci贸n a React - Bootcamp 2018

Bootcamp Intro

My name is Antonio Sejas, I am a React Trainer and this is my intro for 20h bootcamp in 2018

<a href="https://sejas.es" target="_blank"><strong>FullStack &amp; Mobile Remote Developer</strong></a>, Ingeniero Superior en Inform谩tica (UPM), Mongo Developer Certified (MongoDB University) y mentor de <a href="https://reactjs.org/" target="_blank"><strong>React</strong></a> de los estudiantes de Udacity.
Con m谩s de 10 a帽os de experiencia, he desarrollado software para grandes marcas como Telef贸nica, BlackBerry, Randstad, General Electric, Udacity y Pernod Ricard.
Apasionado de la educaci贸n, me encanta aprender y compartir conocimientos a trav茅s del <a href="https://github.es" target="_blank"><strong>open source</strong></a>.
@sejas
sejas / wordpress-woocommerce-snippets.md
Last active February 12, 2026 23:35
WordPress & WooCommerce Snippets (Collection)

WordPress & WooCommerce Snippets

Modify oEmbed WordPress YouTube video parameters

filter to modify oembed wordpress youtube video parameters

<?php
//If you have installed jetpack, you need to add this filter.
@sejas
sejas / === SWIFT GISTs
Last active October 22, 2024 17:20
SWIFT GISTs
# Swift useful and common gists