Skip to content

Instantly share code, notes, and snippets.


Mathias Soeken msoeken

View GitHub Profile
msoeken / BlogAdvent.csproj
Created Dec 4, 2020
Emulation in Q# (Advent calendar blog post, supplemental material)
View BlogAdvent.csproj
<Project Sdk="Microsoft.Quantum.Sdk/0.14.2011120240">
# Download papers from pre-print archives
# Usage (e.g.): python 1308.4134 quant-ph/0008033 2019/854 TR20-021
from collections import namedtuple
import colorama
from colorama import Fore, Style
import os.path
import re
import sys
msoeken / toggle-term.el
Last active Aug 28, 2021
Toggle between current buffer and terminal in emacs
View toggle-term.el
(defun toggle-term ()
"Toggles between terminal and current buffer (creates terminal, if none exists)"
(if (string= (buffer-name) "*ansi-term*")
(switch-to-buffer (other-buffer (current-buffer)))
(if (get-buffer "*ansi-term*")
(switch-to-buffer "*ansi-term*")
(ansi-term (getenv "SHELL"))
(setq show-trailing-whitespace nil)))))