Skip to content

Instantly share code, notes, and snippets.

View tompretty's full-sized avatar

Tom Pretty tompretty

  • London, UK
View GitHub Profile
@tompretty
tompretty / .tmux.conf
Last active June 17, 2020 12:24
tmux config
# prefix
unbind C-b
set -g prefix C-s
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
set nocompatible " required
filetype off " required
let mapleader = ","
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
@tompretty
tompretty / init.vim
Created October 9, 2019 16:47
Neovim init file
let mapleader=','
set textwidth=79
set tabstop=2
set expandtab
set shiftwidth=2
set autoindent
set smartindent
filetype on
import random
from collections import Counter
# - 1 point: E, A, I, O, N, R, T, L, S, U
# - 2 points: D, G
# - 3 points: B, C, M, P
# - 4 points: F, H, V, W, Y
# - 5 points: K
# - 8 points: J, X
# - 10 points: Q, Z
let mapleader=','
let maplocalleader='\\'
set textwidth=79
set tabstop=2
set expandtab
set shiftwidth=2
set autoindent
set smartindent
@tompretty
tompretty / ts_error_history.py
Last active October 28, 2021 10:21
Get the ts error history
import subprocess
from dataclasses import dataclass, asdict
import json
import csv
from typing import List
# ---- Dataclasses ---- #
@dataclass