Skip to content

Instantly share code, notes, and snippets.

@corei8
corei8 / fstrings.py
Created March 19, 2024 18:03
F-string examples from Indently on YouTube
# scientific notion with number of decimals after period
big_number: int = 1_620_000_000
print(f'{big_number:.2e}')
# format dates on the fly
from datetime import datetime
now: datetime = datetime.now()
print(f'{now:%d.%m.%y}')
# nesting f-strings
@corei8
corei8 / gist:704a9903f640a7b41a057a4c18ce50ec
Created July 2, 2023 01:25
Install eventmachine on M-series Macs
gem install eventmachine -v '1.2.7' -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
@corei8
corei8 / git.lua
Last active June 19, 2023 14:55
Add unception as a dependency for git.nvim
{
"Rawnly/gist.nvim",
cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
config = true,
requires = {
"samjwill/nvim-unception",
lazy = true,
event = "VeryLazy",
init = function() vim.g.unception_block_while_host_edits = true end
},
@corei8
corei8 / gist:678756da28e5ac6b5be504ec03fbf6e8
Created June 15, 2023 14:51
Fix for Treesitter in Neovim recompiling all language servers for new buffers
sudo rm -rf ~/.local/share/nvim/*
@corei8
corei8 / tabnineconfig.txt
Created May 3, 2022 22:58
Settings for TabNine in NeoVIM
:exe 'e' ddc_tabnine#config_dir() . '/tabnine_config.json'
@corei8
corei8 / pontificale-chant.tex
Created May 1, 2022 13:32
Settings for Gregorian chant in the style of a medium Pontificale.
% !TEX program = lualatex
% !TEX encoding = UTF-8
\documentclass[20pt, extrafontsizes]{memoir}
\usepackage[letterpaper,vmargin={1in,1in},hmargin={1in,1in}]{geometry}
\usepackage{fullpage}
\usepackage{microtype}
\usepackage{fontspec}
@corei8
corei8 / init.vim
Created April 27, 2022 13:54
NeoVim Settings File
" corei8.github@gmail.com neovim configuration
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set exrc
set guicursor=i:block
set nu
set relativenumber
name: incipit;
gabc-copyright: copyright on this gabc file;
score-copyright: copyright on the source score;
office-part: introitus/...;
occasion: in church calendar;
meter: for metrical hymns;
commentary: source of words;
arranger: name of arranger;
author: if known;
date: xi c;
@corei8
corei8 / main.tex
Last active October 23, 2021 18:36
GregorioTeX Preamble
% !TEX program = lualatex
\documentclass{amsbook}
\author{}
\usepackage{geometry}
% BOOKLET:
%\geometry{paperheight=8.5in, paperwidth=5.5in, top=0.5in, bottom=0.5in, inner=0.5in, outer=0.5in,}
% LETTERPAPER:
@corei8
corei8 / guide.tex
Last active October 23, 2021 18:36
corei8 Latex Guide
% !TEX program = lualatex
\documentclass[11pt]{amsbook}
% book --> good for bound material, margins are designed for binding.
% article --> title appears at the head of the fist page; margins are even.
% report --> same as article, but the title is seperate page.
\usepackage{geometry}
\geometry{
paperheight=8.5in,