Instantly share code, notes, and snippets.
Discover gists
Markdown Preview Enhanced supports renderingflow charts,sequence diagrams,mermaid,PlantUML,WaveDrom,GraphViz,Vega & Vega-lite,Ditaa diagrams.You can also renderTikZ,Python Matplotlib,Plotly and all sorts of other graphs and diagrams by usingCode Chunk.
Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.
This feature is powered byflowchart.js.
| --- | |
| AWSTemplateFormatVersion:2010-09-09 | |
| Description:CIS AWS Foundations Benchmark Metric Alarms | |
| Parameters: | |
| AlarmNotificationTopicARN: | |
| Description:Replace Default value with the ARN for your SNS alarm | |
| #Assume SNS Topic Already Exists with atleast one subscriber | |
| Default:arn:aws:sns:eu-west-1:<ACCOUNT_ID>:CIS-ALARMS | |
| Type:String | |
| CloudtrailLogGroupName: |
| defswag(ip:str)->int: | |
| parts=ip.strip().split('.') | |
| iflen(parts)!=4: | |
| raiseValueError("Invalid IPv4 address: must have 4 octets") | |
| total=0 | |
| fori,pinenumerate(parts): |
| 2teams() { | |
| NOW=$(date +"%Y-%m-%d_%H%M") | |
| if [!-z$2 ];then | |
| echo$NOW"_"$2.mp4 | |
| ffmpeg -i$1 -codec copy$NOW"_"$2.mp4 | |
| else | |
| echo$NOW"_teamsvid".mp4 | |
| ffmpeg -i$1 -codec copy$NOW"_teamsvideo".mp4 | |
| fi | |
| } |
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
On a mac you can usehomebrew by running the commandbrew install pandoc.