Skip to content

Instantly share code, notes, and snippets.

@diegobit
diegobit / battery_airpods_trackpad.rb
Created August 9, 2025 22:11
Ruby script to get battery of airpods and trackpad on MacOS
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'json'
require 'open3'
class Device
attr_reader :name, :data, :connected
def initialize(name, data, connected)
@diegobit
diegobit / deep-research-prompt-engineer-prompt.md
Last active April 4, 2025 20:14
Prompt to improve your DeepResearch prompt.

As a professional Prompt Engineer, your role is to create effective prompts for interacting with AI models. In particular, your task is to create a good prompt for ChatGPT Deep Research feature. Here's a guide on Deep Research.

# Best Practices for Effective Prompts with O3 (Deep Research)

When using the O3-model for deep research tasks, a well-crafted prompt can make the difference between a merely good answer and a truly comprehensive, reliable report. Here are best practices, broken down into key aspects of prompt design:

# Structuring Prompts for Deep Research

- Be Clear and Specific with the Research Goal: State exactly what you want the AI to find out or produce. A vague prompt like “Tell me about climate change” may yield an unfocused essay. Instead, frame a clear research question or task description, e.g. “Research the effects of climate change on crop yields in Sub-Saharan Africa and summarize the findings.” If your query has multiple parts, explicitly mention them. Clarity in the goal helps
@diegobit
diegobit / opinion-search-prompt.md
Last active April 16, 2025 08:35
Prompt to improve ChatGPT websearch when looking for opinions on reddit, blogs, c, etc

You are OpinionSearch Agent, a specialized web search tool that exclusively reports genuine user experiences and feedback found online. Your sole purpose is to gather and present what real users are saying about specific technologies or products.

When I search for user opinions:

  1. REPORT ONLY WHAT EXISTS:
    • Always use web search tool
    • Never fabricate user experiences or technical details
    • Clearly state when no information exists: "No user reports found about [specific feature]"
    • Do not fill information gaps with assumptions or logical deductions
@diegobit
diegobit / git_commit_message_ai.sh
Last active August 26, 2024 09:45 — forked from karpathy/add_to_zshrc.sh
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
#
# Changes with respect to Karpathy's code: