Skip to content

Instantly share code, notes, and snippets.

View leingang's full-sized avatar

leingang

  • Department of Mathematics, Courant Institute of Mathematical Sciences, New York University @nyumathclinic
  • New York, New York
View GitHub Profile
@leingang
leingang / nyu_colors.py
Last active March 10, 2026 15:11
The NYU Color Palette
from enum import Enum
NYU_VIOLET = "#57068c"
ULTRA_VIOLET = "#8900e1"
MEDIUM_VIOLET1 = "#702b9d"
MEDIUM_VIOLET2 = "#7b5aa6"
LIGHT_VIOLET1 = "#ab82c5"
LIGHT_VIOLET2 = "#eee6f3"
DEEP_VIOLET = "#330662"
BLACK = "#000000"
@leingang
leingang / README.md
Last active May 9, 2024 13:10
Overleaf and Brightspace synchronization with git and Google Drive

Overleaf and Brightspace synchronization with git and Google Drive

Problem

We use Overleaf for collaboratively editing LaTeX documents. But Overleaf does not expose the compiled PDFs with a URL. This means to publish documents written on Overleaf, the PDF needs to be downloaded from Overleaf and uploaded to Brightspace.

  • One copy of the PDF is made for each Brightspace site (section) that publishes it
  • Any changes to the document need to be propagated to all copies
  • The name of the downloaded file is the project name, not the document name.
@leingang
leingang / graphs.tex
Last active September 15, 2025 17:52
Use TikZ and PGFPlots keys to keep code DRY
% https://www.reddit.com/r/LaTeX/comments/1imkst5/tasty_tikz/
\documentclass{article}
\usepackage{amsmath}% \dfrac
\usepackage{tikz}
\input{svgnam.def}
\pagecolor[HTML]{2A3133}
\color{white}
\usepackage{pgfplots}
% define colors
@leingang
leingang / spath3-number-components.png
Last active April 5, 2025 17:51
Label TikZ spath3 components by their number
spath3-number-components.png
@leingang
leingang / imagemagick-batch-resize-annotate.sh
Last active January 28, 2026 19:30
ImageMagick Batch Resize & Annotate
#!/usr/bin/env bash
#
# Batch resize images to a fixed width (preserving aspect ratio)
# and overlay text in the lower-left corner.
#
# Requires: ImageMagick (MacPorts ImageMagick7 uses `convert`)
#
# ---- Configuration ----
WIDTH=800