Skip to content

Instantly share code, notes, and snippets.

View mattpetters's full-sized avatar

matt petters mattpetters

  • San Diego
  • 10:15 (UTC -07:00)
View GitHub Profile
@karpathy
karpathy / add_to_zshrc.sh
Created August 25, 2024 20:43
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
@Mourishitz
Mourishitz / neotest.lua
Last active August 29, 2024 22:05
neotest.lua
local prefix = "<Leader>T"
return {
{
"nvim-neotest/neotest",
lazy = true,
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-neotest/nvim-nio",
"V13Axel/neotest-pest",
{
@siduck
siduck / migrate.sh
Last active March 28, 2025 02:54
Migrate from v2.0 to v2.5 ( Unix Only )
#!/bin/bash
# Run the script from home dir
cd ~
nvim_config="$HOME/.config/nvim"
nvim_data="$HOME/.local/share/nvim"
cp -r "$nvim_config" nvim_bak # backup nvim dir
cp -r "$nvim_config/lua/custom" .
@Couto
Couto / neotest.lua
Created October 30, 2023 08:32
neotest.lua
return {
"nvim-neotest/neotest",
cond = not vim.g.vscode,
config = function()
-- get neotest namespace (api call creates or returns namespace)
local neotest_ns = vim.api.nvim_create_namespace("neotest")
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
@ianchesal
ianchesal / overrides.lua
Created May 8, 2023 18:45
copilot.lua + copilot-cmp in NvChad
-- Add the following in your custom/configs/overrides.lua file. You can configure copilot to meet your needs here.
M.copilot = {
-- Possible configurable fields can be found on:
-- https://github.com/zbirenbaum/copilot.lua#setup-and-configuration
suggestion = {
enable = false,
},
panel = {
enable = false,
@ziti
ziti / zachs-rss-feeds.ompl
Created December 22, 2022 00:29
RSS feeds that I am currently subscribing to
<?xml version="1.0" encoding="UTF-8"?>
<!-- OPML generated by NetNewsWire -->
<opml version="1.1">
<head>
<title>zachs-rss-feeds.ompl</title>
</head>
<body>
<outline text=".NET Curry: Recent Articles" title=".NET Curry: Recent Articles" description="" type="rss" version="RSS" htmlUrl="https://www.dotnetcurry.com/" xmlUrl="http://feeds.feedburner.com/netCurryRecentArticles"/>
<outline text="Accidentally in Code" title="Accidentally in Code" description="" type="rss" version="RSS" htmlUrl="https://cate.blog/" xmlUrl="https://cate.blog/feed/"/>
<outline text="Becky Hansmeyer" title="Becky Hansmeyer" description="" type="rss" version="RSS" htmlUrl="https://www.beckyhansmeyer.com/" xmlUrl="https://beckyhansmeyer.com/feed/"/>
@Mau5Machine
Mau5Machine / dynamic.yaml
Last active January 31, 2023 08:05
Traefik Dynamic Configuration File
## Setting up the middleware for redirect to https ##
http:
middlewares:
redirect:
redirectScheme:
scheme: https
@Mau5Machine
Mau5Machine / docker-compose.yml
Last active January 18, 2025 00:17
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@lucasg
lucasg / dash-doggybag.py
Last active March 19, 2025 23:26
Bulk downloader for dash docsets (official and user contributed)
#!/usr/bin/env python3
import sys
import json
import os
import os.path
import shutil
import logging
import tempfile
import glob
import argparse