Skip to content

Instantly share code, notes, and snippets.

@ibuildthecloud
ibuildthecloud / gist:30e99f2eee4cbd614b7e469c6e6444b3
Created April 24, 2024 15:49
OpenAI function calling format
The following tools
```json
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Reads the contents of a file",
"parameters": {
tools: github.com/gptscript-ai/search/brave, sys.write, sys.http.html2text
1. First search the web for some good references on how to write Caddyfile according to the below instructions
2. Then write a the Caddyfile locally in the file Caddyfile
Instructions:
Create a web server that serves static files from the local directory /images at the URL /images. Those images
should have prompt content caching headers on them.
@ibuildthecloud
ibuildthecloud / README.md
Last active April 2, 2024 19:02
k3s on WSL2

Instructions to hack up WSL2 on Windows 10 Build 18917 to run k3s (Kubernetes) and rio

Install WSL2

https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

I already had Ubuntu-18.04 installed in wsl 1. So I just did wsl --set-version Ubuntu-18.04 2

Compile Kernel

Using Ubuntu 18.04 (I'm sure any distro will work), inside WSL2 download https://thirdpartysource.microsoft.com/download/Windows%20Subsystem%20for%20Linux%20v2/May%202019/WSLv2-Linux-Kernel-master.zip and extract to a folder. The latest version of the kernel source is available at (https://github.com/microsoft/WSL2-Linux-Kernel)

tools: sys.http.html2text
json: true
Download the wikipedia article for "Walt Disney" and then process the output according to the following rules
# Knowledge Graph Instructions for GPT-4
## 1. Overview
You are a top-tier algorithm designed for extracting information in structured formats to build a knowledge graph.
- **Nodes** represent entities and concepts. They're akin to Wikipedia nodes.
- The aim is to achieve simplicity and clarity in the knowledge graph, making it accessible for a vast audience.
#cloud-config
users:
- name: root
passwd: root
install:
device: /dev/vda
#!ipxe
set arch amd64
set version v2.0.0-alpha01
set url https://github.com/rancher/os/releases/download/${version}
set kernel rancheros-${version}-${arch}-kernel
set initrd rancheros-${version}-${arch}-initrd
set rootfs rancheros-${version}-${arch}.squashfs
kernel ${url}/${kernel} initrd=${initrd} ip=dhcp rd.cos.disable console=tty1 root=live:${url}/${rootfs} rancheros.install.automatic=true rancheros.install.config_url=http://10.100.0.10/harvester/config-create.yaml
initrd ${url}/${initrd}
boot
@ibuildthecloud
ibuildthecloud / gist:29c7b22ec55bf61ac3a4
Created March 26, 2015 14:10
Build RancherOS VirtualBox VM w/ Autoformat
#!/bin/bash
set -x -e
RANCHER_ISO=machine-rancheros.iso
curl -L https://github.com/rancherio/os/releases/download/v0.2.1/machine-rancheros.iso > $RANCHER_ISO
VM="RancherOS-${RANDOM}"
VBoxManage createhd --format vmdk --filename ./dist/artifacts/$VM.vmdk --size 40000
k3os:
password: rancher
@ibuildthecloud
ibuildthecloud / yaml
Created December 1, 2015 16:53
cloud-config for rancher-agent
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAA...
rancher:
services:
rancher-agent-install:
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
image: rancher/agent:v0.8.2

Keybase proof

I hereby claim:

  • I am ibuildthecloud on github.
  • I am ibuildthecloud (https://keybase.io/ibuildthecloud) on keybase.
  • I have a public key whose fingerprint is 4FF5 E1D0 D3E2 E50C 0BCB 39A0 31C9 9FD9 691B 79C3

To claim this, I am signing this object: