Skip to content

Instantly share code, notes, and snippets.

View grantjenks's full-sized avatar

Grant Jenks grantjenks

View GitHub Profile
@grantjenks
grantjenks / dotfiles-management.md
Created January 17, 2023 01:35
Dotfiles Management
@grantjenks
grantjenks / Terminal.out
Created January 21, 2023 19:33
Proof of Concept for "On-call Assistant"
$ ipython
Python 3.8.4 (v3.8.4:dfa645a65e, Jul 13 2020, 10:45:06)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from langchain.agents import Tool, initialize_agent
...: from langchain.agents import load_tools
...: from langchain.llms import OpenAI
...:
@grantjenks
grantjenks / mac-key-speed.txt
Created March 1, 2023 06:23
Settings for Mac Keyboard Speed
$ defaults write -g InitialKeyRepeat -int 13
$ defaults write -g KeyRepeat -int 1
@grantjenks
grantjenks / Bookmark
Created March 8, 2023 16:44
Scratchpad in Chrome
data:text/html,<body contenteditable style=font-family:monospace;line-height:1.5;font-size:24px><script> window.onbeforeunload = function(e) { e.preventDefault();return ''; }; </script>
@grantjenks
grantjenks / step.py
Created November 21, 2023 01:39
Print all the files tracked by Git
#!/usr/bin/env python
import subprocess
from pathlib import Path
output = subprocess.run(['git', 'ls-files'], stdout=subprocess.PIPE, text=True, check=True)
paths = [Path(path) for path in output.stdout.strip().split('\n')]
for path in paths:
print(path)