Skip to content

Instantly share code, notes, and snippets.

View crowding's full-sized avatar

Peter Meilstrup crowding

View GitHub Profile
@crowding
crowding / remote-emacs.sh
Created August 25, 2012 03:02 — forked from akheron/remote-emacs.sh
Use emacsclient for editing remote files by setting this script as EDITOR in the remote machine
#!/bin/sh
#
# Use this script as your EDITOR to allow editing remote files with emacsclient.
# Works by connecting to the Emacs machine with SSH and using a suitable tramp prefix.
# How to reach this machine from the one that's running Emacs
ME=user@remote-host
# How to reach the machine that's running Emacs from this machine
THEY=user@host-running-emacs
@crowding
crowding / latex-math.r
Last active December 17, 2015 08:08 — forked from hadley/latex-math.r
# User facing function
#
# to_math(x_1 + 1^{2 + 4} + 5 + sqrt(y) / 5 %/% 10)
# to_math(paste(x^2, y - 1, z_i))
# to_math(hat(tilde(ring(x))))
# to_math(pi*r^2)
# to_math(unknown_call(x, floor(sqrt(z))))
to_math <- function(x) {
x <- substitute(x)
env <- latex_env(x)