Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@s-newman
s-newman / lib.rs
Last active February 23, 2021 21:10
A starter `lib.rs` for rust libraries that enables lots of clippy lints and provides some macros to make simple unit tests faster to write.
#![warn(
clippy::all,
clippy::pedantic,
// clippy::cargo,
// TODO: uncomment above
// Restriction lints
clippy::as_conversions,
clippy::dbg_macro,
clippy::decimal_literal_representation,
@s-newman
s-newman / formatting.tex
Created February 4, 2021 22:22
Custom formatting for LaTeX documents, with a focus on class reports.
% This file has been adapted from the Pomona Linguistics Latex Paper template on Overleaf.
% More sane margins
\usepackage[margin=1in]{geometry}
% Gives some extra formatting options, e.g. underlining/strikeout
\usepackage{ulem}
% For putting links into papers, also helps make cross-references in the paper smart references
\usepackage[colorlinks = true,
@s-newman
s-newman / pre-commit
Created September 30, 2019 05:28
A git pre-commit hook script to automatically run the Black formatter for python.
#!/bin/sh
# This relies on a installation of black within a python virtual environment named "black" located at ${HOME}/envs
# Copy me to ${PROJECT_DIR}/.git/hooks/pre-commit
# Then make me executable:
# $ chmod 744 ${PROJECT_DIR}/.git/hooks/pre-commit
${HOME}/envs/black/bin/black .
@s-newman
s-newman / keybase.md
Created June 18, 2019 00:36
Encryption is pretty rad.

Keybase proof

I hereby claim:

  • I am s-newman on github.
  • I am snewman (https://keybase.io/snewman) on keybase.
  • I have a public key ASDxzaufZL5XWW_rME9ejSuDURqxc4tFaqdKg1ZWuF_M5Qo

To claim this, I am signing this object: