Skip to content

Instantly share code, notes, and snippets.

View wusunlab's full-sized avatar

Wu Sun wusunlab

  • Carnegie Institution for Science
  • Stanford, CA, USA
View GitHub Profile
@wusunlab
wusunlab / view_ipynb.sh
Created June 30, 2021 05:38
view Jupyter Notebook in terminal
#!/bin/bash
jupyter nbconvert --stdout --to=markdown $1 | bat -l markdown
@wusunlab
wusunlab / curried-map.rkt
Created September 2, 2018 06:06
curried map in Racket without using curry
(define (curried-map f)
(letrec ([g
(lambda (xs)
(if (null? xs)
null
(cons (f (car xs)) (g (cdr xs)))))])
g))
@wusunlab
wusunlab / pandoc-inline-code-bg.tex
Created May 10, 2018 09:35
Use background color for inline code (\texttt) in pandoc converted LaTeX
% add this argument to pandoc when converting markdown to LaTeX
% --include-in-header="./pandoc-inline-code-bg.tex"
% Reference
% <https://tex.stackexchange.com/questions/411194/package-soul-error-reconstruction-failed>
\usepackage{xcolor}
\usepackage{soul}
\definecolor{inlineBG}{HTML}{F3F3F3} % same as GitHub Flavored Markdown
@wusunlab
wusunlab / codeblock_in_tables.md
Last active April 25, 2018 07:15
test html-style code block in tables in github markdown