Skip to content

Instantly share code, notes, and snippets.

View brettkelly's full-sized avatar

Brett Kelly brettkelly

View GitHub Profile
@dabit3
dabit3 / you_couldve_invented_openclaw.md
Last active March 2, 2026 21:08
You Could've Invented OpenClaw

See more of my writing here.

In this post, I'll start from scratch and build up to OpenClaw's architecture step by step, showing how you could have invented it yourself from first principles, using nothing but a messaging API, an LLM, and the desire to make AI actually useful outside the chat window.

End goal: understand how persistent AI assistants work, so you can build your own (or become an OpenClaw power user).

First, let's establish the problem

When you use ChatGPT or Claude in a browser, there are several limitations:

window.addEventListener( 'DOMContentLoaded', function() {
var $map = $( '.jet-map-listing' );
if ( ! $map.length ) {
return;
}
$map.on( 'jet-filter-custom-content-render', function( event, response ) {
<?php
add_action('rest_api_init', 'getawayRegisterRoute');
function getawayRegisterRoute() {
register_rest_route( 'getaway/v1', 'data', array(
'methods' => WP_REST_SERVER::READABLE,
'callback' => 'getawayDataResults'
));
}
@jheddings
jheddings / ex-notes.py
Last active December 3, 2025 16:25
Import Apple Notes into Notion.
#!/usr/bin/env python3
# !! NOTE - this script is no longer maintained... please see the repo for further
# updates: https://github.com/jheddings/notes2notion
# this script attempts to migrate from Apple Notes to Notion while retaining as
# much information and formatting as possible. there are limitations to the
# export data from Notes, so we try to preserve the intent of the original note.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
@yankiara
yankiara / oxygen-repeater-dynamic-query.php
Last active May 29, 2025 17:34
Use dynamic queries with Oxygen's repeater
/* I'll put here different examples of dynamic query for Oxygen repeater :
* - Use one of the following repeater_dynamic_query definitions
* in code block just BEFORE the repeater
* - Set the repeater custom query settings : post type, number of posts, order...
* - Add the remove_action in a code block AFTER the repeater
*/
/****************************************************************************************************
* Display related posts for any CPT with taxonomy:
@stonehippo
stonehippo / inspect_https-tls-ssl_certs.md
Last active September 12, 2025 10:04
A couple of ways to look at web server HTTPS/TLS/SSL certificate data via the command line

Inspecting HTTPS (TLS, SSL) certificates from the command line

I needed to inspect an HTTPS site's current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well.

With nmap

nmap -p 443 --script ssl-cert [hostname]
@rushijagani
rushijagani / functions.php
Created October 19, 2018 11:07
Override Custom Post Type template
<?php
add_action( 'astra_content_loop', 'custom_post_type_loop_callback' );
function custom_post_type_loop_callback(){
if( "movies" == get_post_type() ) {
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_default' ) );
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_post' ) );
if ( is_singular( "movies" ) ) {
add_filter( 'astra_post_link', '__return_false' );
}
@devinsays
devinsays / example-ajax-enqueue.php
Last active January 27, 2026 14:18
Simple WordPress Ajax Example
<?php
function example_ajax_enqueue() {
// Enqueue javascript on the frontend.
wp_enqueue_script(
'example-ajax-script',
get_template_directory_uri() . '/js/simple-ajax-example.js',
array( 'jquery' )
);
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active February 26, 2026 09:09
tmux Cheat Sheet