Skip to content

Instantly share code, notes, and snippets.

@chunheisiu
Last active November 12, 2025 09:56
Show Gist options
  • Select an option

  • Save chunheisiu/b3e6f88d930db44cbd77627053233816 to your computer and use it in GitHub Desktop.

Select an option

Save chunheisiu/b3e6f88d930db44cbd77627053233816 to your computer and use it in GitHub Desktop.
Useful shell scripts
Useful shell scripts
# pandoc_md2html.sh <input filename> <output filename> <output file title>
pandoc $1 \
--output=$2 \
--from=gfm \
--to=html5 \
--css=$HOME/git/markdown-css/github.css \
--self-contained \
--metadata=title:$3
# pandoc_md2pdf.sh <input filename> <output filename> <output file title>
pandoc $1 \
-V geometry:margin=0.5in \
-V mainfont=Arial \
--output=$2 \
--from=gfm \
--to=latex \
--self-contained \
--pdf-engine=xelatex \
--metadata=title:$3
# Brew
brew update; brew upgrade; brew cu -a; brew cleanup
# Conda
conda update --all
# Pip
pip install -U $(pip freeze | awk '{split($0, a, "=="); print a[1]}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment