Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert McNees mcnees

View GitHub Profile
@mcnees
mcnees / BarnAndPole.tex
Created Nov 26, 2017
A visual resolution of the barn-and-pole paradox of special relativity.
View BarnAndPole.tex
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.markings}
@mcnees
mcnees / RigidRocket.tex
Created Oct 26, 2017
Draw a spacetime diagram showing an accelerating rocket with constant proper length.
View RigidRocket.tex
\documentclass[border=10pt]{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.markings}
@mcnees
mcnees / milkshakeduck.tex
Created Sep 18, 2017
Milkshake Duck in LaTeX
View milkshakeduck.tex
% 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 Sep 14, 2017
Shaded cylinder in perspective
View Example5.tex
\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 Sep 11, 2017
Toast / Airplane Wine phase diagram
View phasediagram.tex
\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 Sep 10, 2017
Shaded hollowed-out sphere
View Example4.tex
\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 Sep 3, 2017
Shrinking sphere in LaTeX with PGF/TikZ
View Example1.tex
\documentclass[crop=true, border=10pt]{standalone}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{tikz-3dplot}
@mcnees
mcnees / Example2.tex
Created Sep 3, 2017
Dirac delta example in PGF/TikZ
View Example2.tex
\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
Hack twitter's CSS
View Favmoji.css for Twitter
/* 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 Mar 30, 2017
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…
View Deprecated Favmoji.css for Twitter
/* 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! */