Skip to content

Instantly share code, notes, and snippets.

View GPT_in_the_shell.py
import subprocess
import openai
import re
from collections import defaultdict
import textwrap
import time
import shlex
openai.api_key = open("./openai_key.txt", "r").read().strip("\n")
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts
View gist:1207002
@mayneyao
mayneyao / notion2blog.js
Last active September 4, 2023 05:06
Notion.so > Personal Blog | custom domain + disqus comment
View notion2blog.js
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",