Skip to content

Instantly share code, notes, and snippets.

@maestrow
maestrow / post.md
Last active February 22, 2023 16:57
How to use html tags in markdown with remark-parse?

How to use html tags in markdown with remark-parse?

From documentation: Note that toHast.allowDangerousHTML does not work: it’s not possible to inject raw HTML with this plugin (as it’s mean to prevent having to use dangerouslySetInnerHTML).

But still there is a way to allow html tags. Thanks to ChristianMurphy suggestion.

I've made just couple improvements:

  1. Module rehype-dom-parse leads to error: 'document is not defined'. So I replace it with 'rehype-parse'.
  2. Extract rehypeParser from handler, so it's created only once.
  3. Also notice about sanitize: false
@maestrow
maestrow / post.md
Last active August 27, 2021 10:34
Python Data Apps
@maestrow
maestrow / readme.md
Created April 13, 2020 14:21
vscode automatically opens cli.js

VSCode automatically opens cli.js

This problem will occur in two cases:

  1. when vscode is not started, vscode will automatically start and open the cli.js file
  2. when I use vscode normally, a new window will automatically open with the content of the cli.js file

Same situation is described in the following guthub issues:

@maestrow
maestrow / gist:d7549a8fd5fe218cf277e752c723a147
Last active March 15, 2020 11:34
Web Scrapping with NodeJs
@maestrow
maestrow / gdrive.sh
Created January 22, 2020 17:56
gdrive.sh
# Usage: gdrive.sh FILEID local_file_path
# Steps to make gdrive link downloadable:
# 1. Select a file that is need to be downloaded and do right click.
# 2. Click Share. A dialog box will appear.
# 3. Click Advance in the right bottom corner.
# 4. Click on the Change.. under who has access.
# 5. Make it On- Public on the web.
# 6. Click Save button.
# source: https://medium.com/@acpanjan/download-google-drive-files-using-wget-3c2c025a8b99
@maestrow
maestrow / readme.md
Last active August 31, 2021 21:14
BI and Analytics platforms

BI and Analytics platforms:

  • https://superset.apache.org/ - Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application
  • https://www.metabase.com/ - Metabase is the easy, open source way for everyone in your company to ask questions and learn from data
  • https://cube.dev/ - Open Source Analytics Framework. A complete open source analytics solution: visualization agnostic frontend SDKs and API backed by analytical server infrastructure

Real time dashboadrs:

  • https://grafana.com/ - Grafana is the open source analytics & monitoring solution for every database

Schedulers:

@maestrow
maestrow / post.md
Created September 20, 2019 10:50
element.innerHTML and element.outerHTML returns valid XHTML

element.innerHTML and element.outerHTML returns valid XHTML.

To test it, create test.html:

<body>
<div>
    <span>
    <p>para 1
    <p>para 2