Skip to content

Instantly share code, notes, and snippets.

@bgrgicak
bgrgicak / pr-comments-to-text.js
Created July 18, 2025 09:46
Export GitHub PR comments into text by running script in Dev tools from the PR page
Array.from(document.querySelectorAll('.timeline-comment-group')).map(
comment => ({
name: comment.querySelector('.author').text,
text: comment.querySelector('.comment-body').innerText
})
).map(comment => 'from @' + comment.name + '\n' + comment.text + '\n\n').join('')
@bgrgicak
bgrgicak / blueprint.json
Created July 7, 2025 06:10
Install and setup the SQLite plugin
{
"steps": [
{
"step": "installPlugin",
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "sqlite-database-integration"
}
},
{
@bgrgicak
bgrgicak / blueprint.json
Created June 3, 2025 11:46
Bookmark Playground
{
"landingPage": "/",
"preferredVersions": {
"php": "8.3",
"wp": "6.8.1"
},
"phpExtensionBundles": [
"kitchen-sink"
],
"features": {
#!/bin/bash
SKIP_BUILD=false
BUILD_PACKAGE=""
# Parse command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
--port=*)
PORT="${1#*=}"
@bgrgicak
bgrgicak / notes.md
Last active December 11, 2024 12:42
WordPress Playground for developers Workshop
<?php
/*
Plugin Name: Theme Starter Content
Description: Theme Starter Content Example Plugin
Version: 1.0.0
*/
add_action( 'after_setup_theme', function() {
add_theme_support( 'starter-content', array(
'posts' => array(
'homepage-section' => array(
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="https://www.w3schools.com/xml/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="https://www.w3schools.com/xml/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="https://www.w3schools.com/xml/">
<s:element name="FahrenheitToCelsius">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Fahrenheit" type="s:string" />
</s:sequence>
</s:complexType>
<?php
/**
* Plugin Name: Fail
* Description: Throw an exception on init
* Version: 1.0
* Author: bgrgicak
* Author URI: https://bero.dev
*/
function fail_plugin_init() {
Adventures
Blueprints
Build files
Buildsheets
Charts
Compositions
Craft books
Drawings
Funfiles
Funprints
<?php
/**
* Plugin Name: Fail
* Description: Throw an exception on init
* Version: 1.0
* Author: bgrgicak
* Author URI: https://bero.dev
*/
function fail_plugin_init() {