Skip to content

Instantly share code, notes, and snippets.

@ryanwelcher
ryanwelcher / settings.json
Last active April 9, 2026 07:52
Add this to your Claude Code settings.json to customize the spinnerVerbs and tips with WordPress-centric ones
{
"spinnerTipsOverride": {
"excludeDefault": true,
"tips": [
"If it's broken, have you tried deactivating all plugins?",
"The answer is probably in functions.php. The problem is also probably in functions.php.",
"wp_enqueue_scripts is a hook, not a suggestion.",
"Always sanitize inputs. Always. No exceptions. Yes, that one too.",
"The loop has been running since 2003. Show some respect.",
"If you're editing core files, I will find out.",
@scgreenhalgh
scgreenhalgh / setup-claude-date-awareness.sh
Created January 13, 2026 16:26
Fix Claude Code's Outdated Solutions Problem Claude Code doesn't know the current date, so it often suggests deprecated APIs, old package versions, and outdated Stack Overflow solutions. This wrapper script fixes that by automatically injecting date context into your CLAUDE.md files. Every time you run `claude`, it updates your global CLAUDE.md …
#!/bin/bash
# setup-claude-date-awareness.sh
#
# Automatically injects current date context into Claude Code's CLAUDE.md files
# so Claude uses up-to-date solutions and documentation.
#
# Tested on: macOS (zsh/bash), Linux (bash/zsh/fish)
#
# Usage:
@emschwartz
emschwartz / README.md
Last active April 27, 2026 06:06
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.

@ctoth
ctoth / CLAUDE.md
Created November 30, 2025 20:46
My Current global CLAUDE.md

Working with Q — Coding Agent Protocol

What This Is

Applied rationality for a coding agent. Defensive epistemology: minimize false beliefs, catch errors early, avoid compounding mistakes.

This is correct for code, where:

  • Reality has hard edges (the compiler doesn't care about your intent)
  • Mistakes compound (a wrong assumption propagates through everything built on it)
  • The cost of being wrong exceeds the cost of being slow

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@jcasabona
jcasabona / wc-membership-learndash.php
Created April 28, 2020 14:22
Update LearnDash Groups based on WooCommerce Membership
<?php
// Update group status when member status changes.
function cc_update_ld_group_from_member_status( $user_membership, $old_status, $new_status ) {
$ld_group_id = LEARNDASH_GROUP_ID;
$user_id = $user_membership->get_user_id();
$wp_user = get_userdata( $user_id );
if ( wc_memberships_is_user_active_member( $user_id, $user_membership->get_plan_id() ) ) {
ld_update_group_access( $user_id, $ld_group_id, false );
@jack-arturo
jack-arturo / wpf-learndash-require-enrolled.php
Created April 21, 2020 08:11
Modifies WP Fusion's course access permissions for LearnDash so users must be enrolled in the course to see the course page
<?php
// Check course access
function check_ld_access( $can_access, $user_id, $post_id ) {
if ( ! function_exists( 'sfwd_lms_has_access' ) ) {
return $can_access;
}
@yanknudtskov
yanknudtskov / functions.php
Last active May 13, 2020 03:17
WooCommerce Subscriptions and LearnDash, based on the work of https://thomaslecoz.com/learndash-with-woocommerce-subscriptions/#code-update
<?php
add_action('cancelled_subscription', 'remove_course_access', 10, 2);
add_action('subscription_put_on-hold', 'remove_course_access', 10, 2);
add_action('subscription_expired', 'remove_course_access', 10, 2);
add_action('activated_subscription', 'give_course_access', 10, 2);
function send_receipt($order_id){
//if($new_status == 'processing' && $status != 'completed' || $new_status == 'completed' && $status == 'processing'){
if($status != 'processing' && $status != 'completed') {
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active April 22, 2025 22:44
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@mgibbs189
mgibbs189 / test.js
Created July 31, 2018 17:21
Redirect when a facet is interacted with
<script>
(function($) {
$(document).on('facetwp-refresh', function() {
if (FWP.loaded && '' == FWP_HTTP.uri) { // if not the initial pageload, and we're on the homepage
window.location.href = '/listings/?' + FWP.build_query_string(); // redirect
}
});
})(jQuery);