Skip to content

Instantly share code, notes, and snippets.

@chunheisiu
Last active April 3, 2021 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chunheisiu/b3e6f88d930db44cbd77627053233816 to your computer and use it in GitHub Desktop.
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 --repository)/Library/Taps/homebrew/homebrew-cask/""
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install brew-cask-completion
brew tap buo/cask-upgrade
brew tap Homebrew/cask-versions
brew tap Homebrew/cask-drivers
RED="\033[1;91m"
WHITE="\033[1;97m"
ENDCOLOR="\033[0m"
# Brew
echo "${RED}##${ENDCOLOR} ${WHITE}Update Brew${ENDCOLOR}"
brew update
brew upgrade
brew cu -a
brew cleanup
echo
# Conda
echo "${RED}##${ENDCOLOR} ${WHITE}Update Conda${ENDCOLOR}"
conda update --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment