- Create a new directory with these three files (requirements.txt, main.py, README.md)
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
- Update
main()
to run the example prompt chains
This file contains 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 python3 | |
# Adaption of https://github.com/tom-doerr/chatgpt_commit_message_hook/main/prepare-commit-msg | |
# | |
# Mark this file as executable and add it into the global hooks folder | |
# whose path is given by the core.hooksPath configuration variable | |
# skip during rebase | |
import sys | |
if len(sys.argv) > 2: |
This file contains 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
#requires -version 7.4 | |
<# | |
This function requires the gh.exe command line tool. | |
You many encounter API rate restrictions under heavy use. | |
#> | |
#load the custom formatting file | |
Update-FormatData $PSScriptRoot\ghLabelStatus.format.ps1xml |
This file contains 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
function Set-BuildVariables { | |
# .SYNOPSIS | |
# Prepares build env variables | |
# .DESCRIPTION | |
# sets unique build env variables, and auto Cleans Last Builds's Env~ variables when on local pc | |
# good for cleaning leftover variables when last build fails | |
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Low')] | |
param( | |
[Parameter(Position = 0)] | |
[ValidateNotNullOrEmpty()] |
This file contains 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
using namespace System.Collections.Generic | |
function Get-OpenApiDefinition { | |
<# | |
Fetches the OpenAPI definition from the specified URI and for every ref, downloads the relative file to the destination folder. Currently only works with relative refs | |
#> | |
param ( | |
#The source | |
[Parameter(Mandatory)] | |
[Uri]$Uri, |
This file contains 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
Function Get-MACAddress { | |
Param( | |
[Switch]$Local, | |
[String]$ComputerName | |
) | |
if ($Local) { | |
$MACAddress = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled = 'True'" | Select-Object -ExpandProperty MACAddress | |
} else { | |
$MACAddress = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled = 'True'" -ComputerName $ComputerName | Select-Object -ExpandProperty MACAddress |
This file contains 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
using namespace System.Collections.Generic | |
using namespace Microsoft.PowerShell.Commands.Internal.Format | |
#Inspired by: https://gist.github.com/aaroncalderon/09a2833831c0f3a3bb57fe2224963942 | |
<# | |
.Synopsis | |
Converts PowerShell Objects or Format-Table output to Markdown | |
#> | |
Function ConvertTo-Markdown { | |
[CmdletBinding()] |
This file contains 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
#Requires -module ThreadJob | |
param( | |
#Filter modules to update by name, otherwise will update all modules | |
[string[]]$Name = @(), | |
[ValidateSet('AllUsers', 'CurrentUser')] | |
$Scope = 'CurrentUser', | |
$ThrottleLimit = 30 | |
) | |
try { |
This file contains 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
services: | |
# ollama and API | |
ollama: | |
image: ollama/ollama:latest | |
container_name: ollama | |
pull_policy: missing | |
tty: true | |
restart: unless-stopped | |
# Expose Ollama API outside the container stack |
This file contains 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
# A skill to store markdown content to our second brain obsidian | |
import os | |
def store_note_to_obsidian(filename, content): | |
""" | |
Store markdown content to our second brain in a local Obsidian vault | |
:param filename: str, filename of the note | |
:param content: str, content of the note as markdown |
NewerOlder