Skip to content

Writing cheatsheet#

Ek line mein

Notes likhte waqt jo bhi cheez chahiye — box, tab, table, key — uska syntax aur live demo, dono yahan.

Boxes (admonitions)#

!!! likho, phir type, phir 4 space indent kar ke content.

!!! tip "Title yahan"
    Content 4 space indent pe.

Note

Aam maloomat ke liye — neutral.

Tip

Koi shortcut ya behtar tareeqa.

Warning

Aisi cheez jo galti se bigaad sakti hai.

Danger

Data ya security ka masla.

Example

Chhota sa demo ya sample.

Quote

Kisi kitab ya docs ka hawala.

Collapsible#

??? use karo !!! ki jagah — box band shuru hoga. ???+ se khula shuru hoga.

Click karo — khulega

Lambi details yahan chhupa do taake page saaf rahe.

Code#

Simple block#

```python
print("hello")
```
def greet(name: str) -> str:
    return f"Salam, {name}!"

Title ke saath#

```python title="app.py"
...
```
app.py
1
2
3
4
5
import requests

r = requests.get("https://api.github.com", timeout=10)
r.raise_for_status()
print(r.json())

linenums="1" line numbers deta hai, hl_lines="2 3" un lines ko highlight karta hai.

Tabs#

=== "Tab ka naam"

    content 4 space indent pe
pip install requests
poetry add requests
uv add requests

Tables#

| Cheez | Matlab |
|---|---|
| `a` | pehli |
Syntax Kya karta hai Kab use karo
**bold** bold zor dene ke liye
*italic* italic naya lafz introduce karte waqt
==mark== highlight scan karte waqt aankh yahan rukni chahiye
~~strike~~ kaat do purani cheez jo ab galat hai
`code` code koi bhi literal cheez

Lists#

- [x] ho gaya
- [ ] baaqi hai
  • Theme set karna
  • Pehla note likhna
  • JavaScript section shuru karna
  • SQL cheatsheet

Keyboard keys#

++ctrl+shift+p++ likho:

  • Search kholne ke liye / ya S
  • Search band karne ke liye Esc
  • Palette switch: header ke top-right icon se

Definition list#

Term
:   Uski tafseel
Session
Connection reuse karta hai aur cookies yaad rakhta hai.
Response
Server ka poora jawab — status, headers, body.

Chhoti cheezein#

Cheez Syntax
Link [text](url)
Button [text](url){ .md-button }
Primary button [text](url){ .md-button .md-button--primary }
Footnote text[^1] aur neeche [^1]: detail
Emoji / icon :material-heart: →
Superscript x^2^ → x2
Subscript H~2~O → H2O
Abbreviation *[HTML]: HyperText Markup Language

Abbreviation ka asar: HTML pe hover karo.1

Frontmatter#

Har note ke bilkul upar. Isi se title, tags aur search chalte hain.

---
title: Python — requests library
tags:
  - python
  - library
date: 2026-08-30
---

Tags lowercase rakho

Python aur python do alag tags ban jate hain — Tags page bikhar jayega.


  1. Footnote aise dikhta hai — page ke bilkul neeche chala jata hai, aur wapas jaane ka arrow bhi milta hai. ↩