Skip to content

Instantly share code, notes, and snippets.

@pizofreude
Last active April 16, 2025 18:22
Show Gist options
  • Save pizofreude/85a78b40ccdb719ed8a9bff74a2aacf9 to your computer and use it in GitHub Desktop.
Save pizofreude/85a78b40ccdb719ed8a9bff74a2aacf9 to your computer and use it in GitHub Desktop.
Methods to center a clickable hyperlink in Markdown.

How to Center a Clickable Hyperlink in Markdown

Method 1

One way to center a clickable hyperlink in HTML is to use the tag inside a

tag with “text-align:center” style1.

For example:


<p style="text-align: center;">
  <a href="https://www.bing.com">This is a centered clickable link</a>
</p>

Method 2

Another way is to use a list of links and style them with “text-align:center” and "display:inline-block"2.

For example:


<ul style="list-style-type:none;">
  <li style="text-align:center; display:inline-block;">
    <a href="https://www.bing.com">This is a centered clickable link</a>
  </li>
</ul>

Method 3 (Works best for GitHub)

This one worked and tested in GitHub README.md:

<p align="center">
<a href="https://github.com/Pizofreude/github-profile-views-counter">
    <img src="https://komarev.com/ghpvc/?username=Pizofreude">
</a>
</p>
@pizofreude
Copy link
Author

Blockquotes with inline HTML and inline HTML with Markdown syntax.

Blockquotes with inline HTML are Markdown elements that allow you to quote external sources or emphasize important passages. They are denoted by the > character at the beginning of a line, followed by the quoted text. In this case, the blockquotes are used to highlight warnings and notes.

Inline HTML with Markdown syntax is used to add HTML elements directly into the Markdown text. In this case, the ! symbol is used to indicate that the following text is a note or warning. The [!NOTE] and [!WARNING] syntax is a way to add a note or warning to the text, and the > symbol is used to create a blockquote.

Usage examples

Warning

Even though the credentials directory is listed in .gitignore to prevent accidental uploads of credential keys, do not push the cloned repo unless you are certain there are no settings that could lead to credential leakage!

Note

GCP Settings

The bucket <your-bucket-name> and the dataset <your-dataset-id> will be created as the pipeline runs. You don't need to create them manually. However,

  1. The bucket name should be globally unique, so we add a random number after the bucket name.
  2. The dataset id does not allow hyphens, so we have to use underscores instead.

under maintenance

@pizofreude
Copy link
Author

Converting Markdown to Jupyter Notebook

This guide explains how to convert a Markdown file to a Jupyter notebook using the nbconvert library in Python.

To convert a markdown file to a Jupyter notebook while keeping the markdown intact, you can use the nbconvert library in Python. Here’s a step-by-step guide to help you:

  1. Install nbconvert if you haven’t already:

    pip install nbconvert
  2. Create a Markdown File: Make sure you have your markdown file ready. Let’s call it example.md.

  3. Convert the Markdown File to a Jupyter Notebook: You can use the following command to convert your markdown file to a Jupyter notebook:

    jupyter nbconvert --to notebook --execute example.md

Here's a more detailed example using Python:

  1. Install the required libraries:

    pip install nbformat nbconvert
  2. Use the following Python script:

    import nbformat
    from nbconvert import MarkdownExporter
    
    # Read the markdown file
    with open('example.md', 'r', encoding='utf-8') as md_file:
        md_content = md_file.read()
    
    # Create a new Jupyter notebook
    notebook = nbformat.v4.new_notebook()
    
    # Add the markdown content as a markdown cell in the notebook
    notebook.cells.append(nbformat.v4.new_markdown_cell(md_content))
    
    # Save the notebook
    with open('example.ipynb', 'w', encoding='utf-8') as nb_file:
        nbformat.write(notebook, nb_file)

This will create a Jupyter notebook file named example.ipynb that includes your markdown content.

@pizofreude
Copy link
Author

Creating Tables in Markdown

This will render as a large, bold heading at the top of the page.

| Column 1 | Column 2 | Column 3 |
| --- | --- | --- |
| Item 1 left-aligned | Item 2 centred | Item 3 right-aligned |

This will be rendered as:

Column 1 Column 2 Column 3
Item 1 left-aligned Item 2 centred Item 3 right-aligned

@pizofreude
Copy link
Author

pizofreude commented Apr 16, 2025

Toggle list

<details> </details>

Usage Example 1

  • Dimension modelling for better understanding the dataset
    Click to view the entity–relationship diagram (powered by dbdiagram.io)

Usage Example 2

We summarize how the components in the data pipeline are set up and where you can find these configurations in this repo.

drawing

Usage Example 3



Free Falasteen image
This will resize the image to 30% of the available width and height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment