This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const REST_NAMESPACE = 'test/v1'; | |
add_action( 'rest_api_init', function () { | |
register_rest_route( REST_NAMESPACE, '/test', [ | |
'methods' => 'GET', | |
'callback' => 'handle_rest_test', | |
'permission_callback' => '__return_true', | |
] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Make it easier to find active tab */ | |
.tab-background { | |
&:is([selected], [multiselected]) { | |
border-top: 1px solid #444 !important; | |
} | |
} | |
/* Thinner pins, even in compact */ | |
.tab-content { | |
padding: 0 4px !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# /// script | |
# requires-python = ">=3.10" | |
# dependencies = [ | |
# "pyperclip", | |
# "requests", | |
# ] | |
# /// | |
import os | |
import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import tkinter as tk | |
from tkinter import messagebox, filedialog | |
import webbrowser | |
import sys | |
import re | |
def extract_urls(text): | |
# More comprehensive URL pattern that handles complex URLs | |
url_pattern = r'https?://[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /// script | |
# requires-python = ">=3.10" | |
# dependencies = [ | |
# "pyperclip", | |
# "requests", | |
# ] | |
# /// | |
import os | |
import requests | |
import subprocess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.1/.schema/devbox.schema.json", | |
"env": { | |
"SCRIPT_AES256_ENCRYPTION_KEY": "<your encryption key here>" | |
}, | |
"packages": [ | |
"uv@latest", | |
"[email protected]" | |
], | |
"shell": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# filename: ~/bin/git-cai | |
# example: git cai | |
# | |
# Copies an AI-generated summary of a commit to the clipboard before opening the commit dialog. | |
# Requires commitmsg and copy aliases | |
# uvx llm keys set gemini | |
# Detect the OS type | |
if [[ "$OSTYPE" == "darwin"* ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
from discord.ext import commands | |
import requests | |
import json | |
# Create a bot instance with a command prefix | |
bot = commands.Bot(command_prefix='!') | |
# WordPress credentials | |
WORDPRESS_URL = 'https://yourwordpresssite.com/wp-json/wp/v2/posts' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my/mysite", | |
"type": "project", | |
"authors": [ | |
{ | |
"name": "My Name", | |
"email": "[email protected]" | |
} | |
], | |
"require": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is a haggling simulator where I am trying to buy any secondhand car and you have the role of the car salesman. the car is values at a certain price which is stated up front. Your aim is to try and get as close to the target price, you get paid by commision which is the typical percentage of the agreed price, which is your score. my goal is to pay as little as possible, anything less than the target price is my score. Every time we play the car is generated again, with a new target price, and new characteristics. There are additional characteristcs of the car and its condition that are not mentioned that can be uncovered by an inspection, that you are aware of. All characteristics are revealed at the end of the game. You, the salesman, use typical car sales techniques to convince me to buy the car at your desired price. I try and use typical car buyer techniques to bring the price down. We take turns making arguments pro and con. Are you ready? When you are ready, generate a car with visible characteristi |
NewerOlder