Skip to content

Instantly share code, notes, and snippets.

font_family MesloLGM Nerd Font
#font_family cozette
macos_traditional_fullscreen yes
font_size 13
window_padding_width 0
shell_integration no-cursor
macos_colorspace default
set-window-option -g mode-keys vi
bind -r C-k resize-pane -U
bind -r C-j resize-pane -D
bind -r C-h resize-pane -L
bind -r C-l resize-pane -R
bind k select-pane -U
bind j select-pane -D
bind h select-pane -L
@nonrice
nonrice / vimrc
Last active May 23, 2026 02:04
vimrc
set nocompatible
filetype plugin indent on
if empty(glob('~/.vim/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
Plug 'bfrg/vim-c-cpp-modern'
@nonrice
nonrice / init.lua
Created May 17, 2025 02:41
nvim conf
vim.o.number = true
vim.o.relativenumber = true
vim.o.cursorline = true
vim.o.lbr = true
vim.o.wrap = true
vim.o.hlsearch = true
vim.schedule(function()
vim.o.clipboard = "unnamedplus"
end)
vim.o.smartindent = true
@nonrice
nonrice / vimrc
Created April 2, 2025 01:10
icpc contest vimrc
sy on
colorscheme blue
set bg=dark rnu nu cul lbr wrap hls cin ai si et sw=4 ts=4 cb=unnamedplus,unnamed enc=utf8 ffs=unix nocp
im {<CR> {<CR><BS>}<Esc>O
no <space>er <Cmd>:vertical botright term sh -c "g++ % -std=c++17 -g -Wall -Wextra -Wpedantic -Wshadow -Wshift-overflow -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -fsanitize=address,undefined -fsanitize-address-use-after-scope && ./a.out"<CR>
@nonrice
nonrice / ttsmaker_query.py
Last active July 17, 2023 16:15
Simple command line tool to interact with TTSMaker API. Automatically split queries by newline to avoid character limit!
import requests, json, argparse, os, uuid, time
def ttsmaker_query(text, output_file, token="ttsmaker_demo_token", voice_id=147, audio_format="wav", speed=1.05, volume=0, paragraph_pause=0):
if "\n" in text:
os.system("sox " + " ".join([ttsmaker_query(text_frag, str(uuid.uuid4())+"."+audio_format, token, voice_id, audio_format, speed, volume, paragraph_pause) for text_frag in text.split("\n")]) + " " + output_file)
return output_file
url = 'https://api.ttsmaker.com/v1/create-tts-order'
headers = {'Content-Type': 'application/json; charset=utf-8'}
params = {
@nonrice
nonrice / learner.cpp
Last active May 10, 2026 20:38
Quizlet is SHIT
#include <iostream>
#include <algorithm>
#include <array>
#include <random>
#include <chrono>
#include <vector>
#include <string>
#include <fstream>
#include <cstdlib>
@nonrice
nonrice / amber.conf
Last active May 19, 2026 02:04
Super good colorscheme made by me for kitty terminal
# https://gist.github.com/nonrice/a741901b887a070c37ad93b2e2c14c7a
background #38230D
foreground #FF9729
cursor #FF9729
color0 #38230D
color1 #CE4B16
color2 #9A781E
color3 #FF9721
color4 #8D6020
# Command line tool to manage journal entries
#
# SETUP:
# 1. Install required tools: Vim, FZF
# 2. Replace the contents of JOURNAL_DIR with where you want the journal to be
# 3. (Optional) make an alias in your shell RC to easily run the script
JOURNAL_DIR = "/Users/eric/Workspace/journal"
# HOW TO USE:
# Simply run the file and supply arguments if needed
@nonrice
nonrice / vimrc
Last active January 2, 2023 20:21
My vimrc
filetype plugin indent on
autocmd filetype cpp nnoremap <F5> <Cmd>:w<CR>:!cprun.zsh %<CR>
autocmd filetype tex nnoremap <F5> <Cmd>:w<CR>:!xelatex % && open %<.pdf<CR>
autocmd filetype python nnoremap <F5> <Cmd>:w<CR>:!python3 % < ~/.in<CR>
nnoremap <F6> <Cmd>:w<CR>:e ~/.in<CR>
set tabstop=4 shiftwidth=4 softtabstop=4 autoindent expandtab
set backspace=2
set number relativenumber