Skip to content

Instantly share code, notes, and snippets.

View Blindpete's full-sized avatar
🧠
Learning....

Pete Cook Blindpete

🧠
Learning....
View GitHub Profile
@Blindpete
Blindpete / Find-GitRepositories.ps1
Last active June 19, 2025 10:06
Find-GitRepositories
$results = Get-ChildItem -Path C:\ -Recurse -Directory -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Name -eq ".git" } |
ForEach-Object {
$repoRoot = $_.FullName | Split-Path -Parent
Set-Location -Path $repoRoot
$remoteUrl = git config --get remote.origin.url
$branch = git rev-parse --abbrev-ref HEAD
[PSCustomObject]@{
Path = $repoRoot
RemoteUrl = $remoteUrl
@Blindpete
Blindpete / template.md
Created June 14, 2025 12:30
Create a text-to-image prompt

Create a text-to-image prompt for an infographic on making British Breakfast Tea using the template below

{
    "scene": "[Overall scene description]",
    "subjects": [
        {
            "type": "[building/person/vehicle/nature/object/animal]",
            "description": "[Detailed visual description]",
            "pose": "[static/dynamic pose description]",
@Blindpete
Blindpete / Instructions.md
Created May 3, 2025 21:50
Detailed Text Analysis & Q&A Instructions - Instructions

Instructions:

  1. Generate questions covering the input text's core meaning: theme, support, facts, author's purpose, and implications.
  2. Answer each generated question sequentially and in detail.
  3. Writing Style: Produce clean, readable Markdown output. Use British English. Employ straightforward language, short sentences, and active voice. Format with bullet points and frequent line breaks. Provide actionable insights, specific examples/data, engaging questions, and direct address ('you'). Avoid cliches, metaphors, generalisations, introductory/concluding phrases, warnings, extras, hashtags, semicolons, emojis, asterisks. Minimise adjectives/adverbs. Adhere strictly to the request.
  4. Forbidden Words/Phrases: Accordingly, Additionally, Arguably, Basically, Certainly, Clearly, Consequently, Essentially, Fundamentally, Generally, Hence, However, In fact, In order to, It should be noted, Just, Moreover, Obviously, Perhaps, Quite, Rather, Really, Relatively, Simply, Somewhat, That being said,
@Blindpete
Blindpete / READEME.md
Created February 28, 2025 09:27
Using UV to run python scripts on Windows

Using UV to run python scripts on Windows

No python installed on Windows, no problem. Use UV to run python script on Windows. https://docs.astral.sh/uv/

Note

You can also do this on Linux and MacOS, update install instructions as needed. Installation Docs

Install UV

@Blindpete
Blindpete / main.go
Created October 19, 2024 12:30
go-oai-audio-preview
package main
import (
"bufio"
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
@Blindpete
Blindpete / instructions.md
Created October 2, 2024 20:53
Terraform Instructions

You will be providing responses for creating Terraform configurations using the AzureRM provider with a focus on specific resources from the Azure services with their corresponding abbreviations. You need to structure the code in files: main.tf, variables.tf, outputs.tf, and terraform.tfvars as necessary.

To complete the task, follow the guidelines below for each question:

  1. Use the given abbreviations for the resources in the response.
  2. Separate the Terraform code in the appropriate files.
  3. Provide a detailed explanation of the code in a concise manner.
  4. Always include accurate code snippets for implementing the resources.

When a user asks about a specific Azure resource or service, follow these steps:

  • Use the provided abbreviations for each resource.
Function Get-OpenAIModels {
[CmdletBinding()]
Param(
[Parameter(Mandatory = $false)]
[string]$ApiKey = $env:OPENAI_API_KEY
)
if (-not $ApiKey) {
Throw "API key is required. Please provide it as a parameter or set it in the OPENAI_API_KEY environment variable."
}
@Blindpete
Blindpete / Invoke-BraveSearchAPI.ps1
Created September 1, 2024 11:08
BraveSearchAPI
function Invoke-BraveSearch {
<#
.SYNOPSIS
Invokes the Brave Search API to perform a web search.
.DESCRIPTION
The Invoke-BraveSearch function is used to perform a web search using the Brave Search API. It sends a request to the API with the specified query and retrieves the search results.
.PARAMETER Query
The search query string.
.PARAMETER ApiKey
The API key for accessing the Brave Search API. If not provided, it will use the value of the BRAVE_SEARCH_API_KEY environment variable.
@Blindpete
Blindpete / Trending.ps1
Last active July 9, 2024 10:40
GitHub PowerShell 30 Day Trending.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.