Skip to content

Instantly share code, notes, and snippets.

View lonerz's full-sized avatar
👨‍💻

Joshua Pan lonerz

👨‍💻
View GitHub Profile
@gillescastel
gillescastel / Ultisnip snippets
Last active February 1, 2024 13:39
Vimtex setup
snippet template "Basic template" b
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[dutch]{babel}
\usepackage{amsmath, amssymb}
\begin{document}

Let's classify all the possible equilateral triangles of interest. As there are more equilateral triangles in the proof, let's call those we want to count the counting triangles.

For each of the counting triangle asked, define its enclosing triangle be the minimal upright equilateral triangle that goes alone the network. Here, upright means the triangle has one side being horizontal, and the third vertex is above the horizontal side. Later in the text, the term upside-down will appear, meaning the opposite of upright, ie. one side being horizontal but the third vertex is below the horizontal side.

For example, here are some counting triangles (red) and their enclosing triangle (blue). The second counting triangle is upside-down.

Image1

We classify counting triangles by the side length of its enclosing triangle, as this directly related to how many these triangles are there in the original network. If the network has side N, we can find the number of ways

@gnarf
gnarf / ..git-pr.md
Last active April 12, 2024 22:00
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out