Skip to content

Instantly share code, notes, and snippets.

View nonnontrivial's full-sized avatar

Kevin Donahue nonnontrivial

View GitHub Profile
@nonnontrivial
nonnontrivial / settings.json
Last active December 8, 2023 13:44
vscode settings
{
"telemetry.telemetryLevel": "off",
"git.enableSmartCommit": true,
"python.defaultInterpreterPath": "/usr/local/bin/python3",
"python.analysis.extraPaths": [
"~/Library/Python/3.11/lib/python/site-packages"
],
"python.testing.pytestEnabled": true,
"python.analysis.typeCheckingMode": "off",
"[python]": {
@nonnontrivial
nonnontrivial / keybindings.json
Last active November 14, 2023 16:47
vscode keybindings
[
{
"key": "ctrl+shift+d",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "f12",
"command": "-editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
[editor]
mouse = false
auto-completion = true
cursorline = true
cursorcolumn = true
auto-format = true
auto-save = true
idle-timeout = 300
completion-trigger-len = 2
auto-info = true
@nonnontrivial
nonnontrivial / settings.json
Last active April 6, 2024 18:50
zed config
{
"vim_mode": true,
"theme": "Summercamp",
"relative_line_numbers": true,
"buffer_line_height": "standard",
"buffer_font_family": "Menlo",
"ui_font_family": "Menlo",
"terminal": {
"font_family": "Menlo"
},
@nonnontrivial
nonnontrivial / complete.py
Created August 18, 2024 20:11
gpt in the terminal
#!/usr/bin/env python
import os
import sys
import platform
from openai import OpenAI
from openai.types.chat.chat_completion_chunk import Choice
api_key = os.getenv("OPENAI_KEY", "")