Skip to content

Instantly share code, notes, and snippets.

View Artem-B's full-sized avatar
-

Artem Belevich Artem-B

-
View GitHub Profile
@Artem-B
Artem-B / osc52e.el
Created April 8, 2020 18:00 — forked from mecab/osc52e.el
Copy text from emacs into xterm, hterm, trough screen and tmux, with support for graphical displays and multi-byte characters
;;;; This script can be loaded during emacs initialization to automatically
;;;; send `kill-region' and `kill-ring-save' regions to your system clipboard.
;;;; The OSC 52 terminal escape sequence is used to transfer the selection from
;;;; emacs to the host terminal.
;;;; It is based off of the osc52.el copyright the Chromium OS authors, but
;;;; was modified to add support for tmux, graphical displays, and
;;;; multi-byte strings.
;;;; It works in hterm, xterm, and other terminal emulators which support the
@Artem-B
Artem-B / colab-latex.py
Created September 30, 2019 06:35 — forked from nikibobi/colab-latex.py
Add LaTeX support to a Colab notebook for SymPy
import sympy
def custom_latex_printer(exp, **options):
from google.colab.output._publish import javascript
url = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=default"
javascript(url=url)
return sympy.printing.latex(exp, **options)
sympy.init_printing(use_latex="mathjax", latex_printer=custom_latex_printer)