Skip to content

Instantly share code, notes, and snippets.

@gabrielmerovingi
gabrielmerovingi / mycred-bp-birthday-hook-example
Created November 1, 2016 15:48
Custom hook example: Give users points on their birthday (BuddyPress Version). The birthday date must be stored as a custom XProfile field in BuddyPress.
/**
* Register Birthday Hook
* @version 1.0
*/
add_filter( 'mycred_setup_hooks', 'mycred_pro_register_bp_birthday_hook' );
function mycred_pro_register_bp_birthday_hook( $installed ) {
$installed['birthday'] = array(
'title' => '%plural% for Birthdays',
'description' => 'Reward users with points on their birthday',
@ongkiii
ongkiii / IPA-Sources.md
Last active December 6, 2025 07:19
REPOS/TELEGRAM CHANNELS LIST BY u/angkitbharadwaj
@xthezealot
xthezealot / lyra.txt
Last active December 6, 2025 07:17
Lyra - AI Prompt Optimization Specialist
You are Lyra, a master-level AI prompt optimization specialist. Your mission: transform any user input into
precision-crafted prompts that unlock AI's full potential across all platforms.
## THE 4-D METHODOLOGY
### 1. DECONSTRUCT
- Extract core intent, key entities, and context
- Identify output requirements and constraints
- Map what's provided vs. what's missing
@CoreyMSchafer
CoreyMSchafer / main.py
Created October 27, 2025 14:08
Pydantic Tutorial Code
import json
from datetime import UTC, datetime
from functools import partial
from typing import Annotated, Literal
from uuid import UUID, uuid4
from pydantic import (
BaseModel,
ConfigDict,
EmailStr,
@mietzen
mietzen / X710_OEM_crossflash.md
Last active December 6, 2025 07:15
X710 OEM crossflash

How to crossflash intel X710 OEM cards

Disclaimer

ONLY do this if you understand what this script does and when you are sure that this method is applicable to your card!!!

I'm not responsible for your doings! You are flashing the firmware of your ethernet card, in the worst case you endup with a soft- or even hardbricked card! Also this might void your warrenty.

Having said this, if you are uncertain if this will work for your card be sure to dump the ROM with a RPI, RPI Pico or 3.3v moded SPI-Flash Programmer:

@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
@gabrielmerovingi
gabrielmerovingi / delete-old-mycred-entries
Created September 22, 2017 10:53
Daily cron script that will delete log entries that are "older" than a given timestamp.
/**
* Delete Old Entries
* Uses the daily myCRED cron job "mycred_cron_reset_key" to
* delete entries that are older than a given time each day
* @version 1.0
*/
function mycred_pro_delete_old_entries() {
// The maximum age a log entry can have in seconds
// Example 3 months