Skip to content

Instantly share code, notes, and snippets.

View jkpe's full-sized avatar
🦕

Jack Pearce jkpe

🦕
View GitHub Profile
name: commit new automations and write llm generated commit message
on: [workflow_dispatch]
jobs:
update-automations-llm-commit-message:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@jkpe
jkpe / cloudflare-tunnel-k8s-deployment.yaml
Created June 17, 2024 07:31
Cloudflare Tunnel Deployment on K8s
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: cloudflared
name: cloudflared-deployment
namespace: default
spec:
replicas: 2
selector:
@jkpe
jkpe / keypoints.py
Created July 4, 2023 12:04 — forked from avelican/keypoints.py
Keypoints.py - Summarize a long text document to bullet points
import os
import openai
prompt = "I'm a busy CEO, please summarize the following in 10-20 bullet points. Include only the most important, useful or interesting information.\n\n"
# model = 'gpt-3.5-turbo' # 'gpt-4' # moved to gpt_chat_completion since we use both
CONTEXT_SIZE = 4096 # 2048 for GPT-3 (as half the input.
# CONTEXT_SIZE = 1024 # tiny context for testing
MAX_TOKENS_IN = int(CONTEXT_SIZE*2/3)
MAX_TOKENS_OUT = CONTEXT_SIZE - MAX_TOKENS_IN
FROM caddy:2
ADD Caddyfile /etc/caddy/Caddyfile
EXPOSE 80
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]
name: blank-app
region: lon
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>APNs</key>
<array>
<dict>
Install dependencies
apt install libssl-dev openssl
Download and install latest Stunnel from https://www.stunnel.org/downloads.html
wget https://www.stunnel.org/downloads/stunnel-x.xx.tar.gz
tar -xvf stunnel-x.xx.tar.gz
cd stunnel-x.xx
./configure