sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams.
You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.
Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.
This feature is powered by flowchart.js.
| #!/bin/bash | |
| # ============================================================================= | |
| # Author: Chu-Siang Lai / chusiang (at) drx.tw | |
| # Filename: teams-chat-post-for-workflows.sh | |
| # Modified: 2024-07-22 11:44 (UTC+08:00) | |
| # Description: Post a message to Microsoft Teams via "Post to a chat when a webhook request is received" workflows. | |
| # Reference: | |
| # | |
| # - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025 | |
| # - https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/ | 
The PATH is an important concept when working on the command line. It's a list
of directories that tell your operating system where to look for programs, so
that you can just write script instead of /home/me/bin/script or
C:\Users\Me\bin\script. But different operating systems have different ways to
add a new directory to it:
| # full diff | |
| git diff <SHA1> <SHA1> -- `find . -name '<pattern>'` | |
| # only file names | |
| git diff <SHA1> <SHA1> --name-status -- `find . -name '<pattern>'` | 
We want to upload file to a server with POST HTTP request. We will use curl functions.
// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");
// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");
# move to home directory
cd ~
# move the .zsh_history file into another .zsh_history_bad file
mv .zsh_history .zsh_history_bad
# write all printable strings into a new .zsh_history file
strings .zsh_history_bad > .zsh_history| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container | 
| # Install tmux 2.8 on Centos | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | |
| # cd src | |
| cd /usr/local/src | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz |