Skip to content

Instantly share code, notes, and snippets.

View sschuldenzucker's full-sized avatar

Steffen Schuldenzucker sschuldenzucker

View GitHub Profile
// restore original behavior of Alt+Left in Roam Research.
// Without this, there's not back shortcut AFAIA, which is just insane.
// USAGE: Anywhere, create a block with content {{[[roam/js]]}}.
// Place the following code nested below that block.
// Then execute the block by clicking the button.
// (this only needs to be done once; it'll be done automatically for you from now on until you stop or delete the code block)
document.addEventListener('keydown', (ev)=> {
if (ev.altKey && ev.shiftKey==false && ev.ctrlKey==false && ev.code=='ArrowLeft') {
@sschuldenzucker
sschuldenzucker / roam2tex.js
Created September 1, 2020 17:18
roam2tex
/*
Input: Roam Research's non-standard markdown. (copied from a roam page or export)
Output: Latex
The goal of this is to draft papers and other documents in Roam.
Thus, we export regular text, *not* a bullet list!
Reads from stdin, writes to stdout.
Example input: https://roamresearch.com/#/app/publicpages/page/WP7tXRTgK
@sschuldenzucker
sschuldenzucker / PerScreen.hs
Last active September 13, 2015 12:18
E.Z. Yang's PerScreen xmonad layout modifier for choosing layouts dynamically based on screen width.Source: http://blog.ezyang.com/2015/05/width-adaptive-xmonad-layout/
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.PerScreen
-- Copyright : (c) Edward Z. Yang
-- License : BSD-style (see LICENSE)
--
-- Maintainer : <ezyang@cs.stanford.edu>
-- Stability : unstable