Skip to content

Instantly share code, notes, and snippets.

View mcnees's full-sized avatar

Robert McNees mcnees

View GitHub Profile
@mcnees
mcnees / BarnAndPole.tex
Created November 26, 2017 18:47
A visual resolution of the barn-and-pole paradox of special relativity.
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.markings}
@mcnees
mcnees / RigidRocket.tex
Created October 26, 2017 21:22
Draw a spacetime diagram showing an accelerating rocket with constant proper length.
\documentclass[border=10pt]{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.markings}
@mcnees
mcnees / milkshakeduck.tex
Created September 18, 2017 20:05
Milkshake Duck in LaTeX
% Requires latest version of tikzducks from github
% https://github.com/samcarter8/tikzducks
\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{tikzducks}
@mcnees
mcnees / Example5.tex
Created September 14, 2017 02:40
Shaded cylinder in perspective
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
% Some colors I like. The first six are modified versions of colors from
@mcnees
mcnees / phasediagram.tex
Created September 11, 2017 18:21
Toast / Airplane Wine phase diagram
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
% Some colors I like. The first six are modified versions of colors from
@mcnees
mcnees / Example4.tex
Last active September 10, 2017 20:54
Shaded hollowed-out sphere
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
% Some colors I like. The first six are modified versions of colors from
@mcnees
mcnees / Example1.tex
Created September 3, 2017 01:17
Shrinking sphere in LaTeX with PGF/TikZ
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{tikz-3dplot}
@mcnees
mcnees / Example2.tex
Created September 3, 2017 01:20
Dirac delta example in PGF/TikZ
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
@mcnees
mcnees / Favmoji.css for Twitter
Last active May 11, 2017 14:09
Hack twitter's CSS
/* Install the Stylish extension for your browser, then add this code
as a new Style. Make sure it applies to the domain 'twitter.com' */
/* You can get Stylish here: */
/* Safari - http://sobolev.us/stylish/ */
/* Chrome - https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe */
/* Tweet improvements, comments, or corrections to @mcnees. */
/* Thanks to: @pbausch, @mathowie, @blakestacey, @ukuleledan and others! */
@mcnees
mcnees / Deprecated Favmoji.css for Twitter
Last active March 30, 2017 21:47
Install Stylish for your browser, then add this code as a new style that applies to the domain twitter.com. It let's you replace your fav button and notification stream icons with the emojis of your choice, and replaces "Likes" with "Favorites" on your profile page. You can also change the "Block" option under a user's drop-down menu to "Drop In…
/* Install the Stylish extension for your browser, then add this code
as a new Style. Make sure it applies to the domain 'twitter.com' */
/* You can get Stylish here: */
/* Safari - http://sobolev.us/stylish/ */
/* Chrome - https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe */
/* Tweet improvements, comments, or corrections to @mcnees. */
/* Thanks to: @pbausch, @mathowie, @blakestacey, @ukuleledan and others! */