Last active
November 12, 2025 09:56
-
-
Save chunheisiu/b3e6f88d930db44cbd77627053233816 to your computer and use it in GitHub Desktop.
Useful shell scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Useful shell scripts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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