Skip to content

Instantly share code, notes, and snippets.

@eivan
eivan / initialize_env_for_vcxserv.sh
Created May 2, 2019 07:44
Set up bash to export proper values for vcxserv x server (I'm using it for WSL)
echo "export DISPLAY=:0" >> ~/.bashrc
echo "export LIBGL_ALWAYS_INDIRECT=1" >> ~/.bashrc
@eivan
eivan / Macaulay2_on_Windows10.md
Last active April 11, 2024 09:20
Macaulay2 on Windows 10 with X server and Emacs GUI

Macaulay2 for 'Linux subsystem for Windows', with GUI

Macaulay 2, M2 for short, currently is mainly developed for Linux distros. For most Windows distro-s, use Cygwin to get Linux bash and through that, M2 command to start Macaulay2. However, Windows 10 for developers and insider builds come with a new feature, "Linux subsystem for Windows".

See the following sections for the steps for installation of, firstly, the Linux subsystem then M2, followed by installing and setting up an X server with emacs coupled with M2.

Get 'bash' for Windows and M2:

1.) Get Ubuntu "bash" in cmd Install "Linux subsystem for Windows" with ubuntu.

Follow instructions: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide

@eivan
eivan / accented_2_tex.tex
Last active December 3, 2019 10:03
Replacing accented characters in LaTeX back and forth using Regular Expressions
% replacing accented characters using regexp-s
% can be used in Notepad++'s replace function for example
% %%%%%%%%%%%%%%%%%%%%%%% %
% accented letters -> tex %
% %%%%%%%%%%%%%%%%%%%%%%% %
% pattern:
(é)|(á)|(ű)|(ő)|(ú)|(ö)|(ü)|(ó)|(í)|(É)|(Á)|(Ű)|(Ő)|(Ú)|(Ö)|(Ü)|(Ó)|(Í)
% replace:
(?1\\'e)(?2\\'a)(?3\\H{u})(?4\\H{o})(?5\\'u)(?6\\"o)(?7\\"u)(?8\\'o)(?9\\'i)(?10\\'E)(?11\\'A)(?12\\H{U})(?13\\H{O})(?14\\'U)(?15\\"O)(?16\\"U)(?17\\'O)(?18\\'I)