Tag: api

  • Get OctoPrint Status via Bash

    Get OctoPrint Status via Bash

    I’m working on a module to add OctoPrint status to my zsh prompt, which I’ll probably write about in the future as a bigger post about my prompt customizations. To start with that though, I need to play around with accessing the API via curl. So here’s my super alpha version that will request the…

  • Super Simple OpenAI PHP Class

    Super Simple OpenAI PHP Class

    I’ve been playing around with hooking up ChatGPT/Dall-E to WordPress and WP-CLI. To do this, I whipped up a super simple class to make this easier: I can generate images and get back text from the LLM. Here’s some examples ChatGPT made to show how you can use these: Example 1: Generating an Image This…

  • How To Restrict User to Self Posts in WordPress

    How To Restrict User to Self Posts in WordPress

    To secure our private site while using a third-party WordPress REST API integration, I restricted the plugin user to its own posts with user_has_cap and allowed access to its revisions. I also used posts_results to mark non-qualifying posts as private. Here’s a sample implementation for similar needs.

  • Sending Prowl Alerts via Bash

    Sending Prowl Alerts via Bash

    Learn how to send alerts using Prowl for server scripting, ensuring proper alert notifications, even after struggling with other options like Twilio.

  • iOS Reminders to Habitica To Do’s via IFTTT

    iOS Reminders to Habitica To Do’s via IFTTT

    Learn how to sync iOS Reminders with Habitica’s To Do’s using IFTTT. Utilize Habitica’s API to create tasks and authenticate requests with special headers and a JSON body payload. IFTTT will send the data to Habitica, allowing you to earn XP as you complete tasks.

  • Wisps, a WordPress Plugin

    Wisps, a WordPress Plugin

    With Wisps, you can have code snippets similar to Gist, Pastebin, or similar code sharing sites. Using the built-in WordPress code editor, you can write snippets to post and share.

  • Better Caching in WordPress

    Better Caching in WordPress

    Caching data in WordPress is essential for performance. Using the Transients API is common but using the WP_Object_Cache functions can offer more flexibility, especially for scenarios like API data changes. Additionally, caching too much data can lead to inefficiencies, so optimizing cache object size can significantly improve performance.