Skip to content

Instantly share code, notes, and snippets.

View wchargin's full-sized avatar

Willow Chargin wchargin

View GitHub Profile
@wchargin
wchargin / Vex.jsx
Created December 10, 2015 07:15
proof-of-concept: rendering musical notes in React
import Vex from 'vexflow';
import React, {Component} from 'react';
const {
Accidental,
Formatter,
Stave,
StaveNote,
Renderer,
@wchargin
wchargin / tex.vim
Created December 27, 2015 19:20
adding math concealment bindings for TeX
" Excerpted from ~/.vim/after/ftplugin/tex.vim,
" which is sourced (executed) right after loading any TeX file
" (more precisely, any file with filetype=tex).
"
" These commands set up concealing for some math characters
" in addition to those defined throughout /usr/share/vim/vim74/syntax/tex.vim.
" See ':help conceal' for more information about concealment,
" and add 'set concealllevel=1' to your .vimrc to enable concealing.
"
" Test Plan:
@wchargin
wchargin / .vimrc
Created January 7, 2016 14:12
real-time Haskell expression-internal type inference
let g:airline_section_gutter = "%{MyStatuslineFunction()}%="
function! MyStatuslineFunction()
if &l:ft != "haskell"
return "nope"
else
let l:file = expand("%")
if l:file == ''
return ""
endif
if !filereadable(l:file)
@wchargin
wchargin / ListsBenchmark.java
Created January 18, 2016 18:20
ArrayList vs. LinkedList
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
public class ListsBenchmark {
\documentclass{article}
\usepackage{tikz}
\usepackage[siunitx,americanvoltages]{circuitikz}
\usepackage{geometry}
\pagenumbering{gobble}
\begin{document}
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\newcommand{\mtsym}{\sqcup}
\pagestyle{empty}
\begin{document}
@wchargin
wchargin / gradle_cobertura.out
Created January 22, 2016 01:07
gradle cobertura 2>&1
:coberturaReport UP-TO-DATE
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:instrument UP-TO-DATE
:copyCoberturaDatafile
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
@wchargin
wchargin / linearlorentz.pdf
Last active February 1, 2016 21:38
linearity of the Lorentz transformation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass[tikz,border=24pt]{standalone}
\usetikzlibrary{patterns,calc,decorations.markings,arrows}
\usepackage{tkz-euclide}
\usetkzobj{all}
\tikzset{
ray/.style={
dashed,
},
ray segment/.style={
@wchargin
wchargin / chicago-authordate.bbx.diff
Created February 15, 2016 03:11
biblatex-chicago patch for months with no issue or number (with MWE)
2694c2694
< \ifthenelse{\iffieldundef{issue}%\AND\iffieldundef{month}
---
> \ifthenelse{\iffieldundef{issue}\AND\iffieldundef{month}
2877a2878
>