Syntax Highlighting
This post is to see all language and icon syntax highlighting
#Example
#Language
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>body {
color: #000;
}console.log('Hello World');console.log('Hello World');# Hello World
This is **bold** text.# Hello World
<Component />// Testing Sass Icon
$primary-color: #CC6699;
body { color: $primary-color; }/* Testing Tailwind Icon */
@tailwind base;# Testing Bash Icon
echo "Hello World"def hello():
print("Hello World")package main
import "fmt"
func main() {
fmt.Println("Hello World")
}fn main() {
println!("Hello World");
}public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}<?php
echo "Hello World";
?>puts "Hello World"print("Hello World")fun main() {
println("Hello World")
}void main() {
print('Hello World');
}print("Hello World")<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>// Testing Arduino Icon
void setup() {}// Testing Arduino Icon
void setup() {}// Testing C Icon
void setup() {}// Testing C# Icon
void setup() {}#Framework
// Testing Vue Icon
export default {
name: 'VueComponent'
}// Testing Vue Icon
export default {
name: 'VueComponent'
}// Testing Angular Icon
@Component({
selector: 'app-root'
})// Testing .NET Icon
var builder = WebApplication.CreateBuilder(args);@if (count($records) === 1)
I have one record!
@endifimport 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}#Database
-- Testing PostgreSQL Icon
SELECT * FROM users;generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL") // NOTE: Please consider when using multiple environment (e.g. dev, staging, and production)
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
model User {
id String @id @default(uuid())
fullName String
email String @unique
gender UserGender
age Int
phoneNumber String
password String
refreshToken String? @db.VarChar(512)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
role Role @relation(fields: [roleId], references: [id])
roleId String
profile Profile?
UserChatRoom ChatRoom[] @relation("UserChatRoom")
ExpertChatRoom ChatRoom[] @relation("ExpertChatRoom")
@@map("users")
}-- Testing MySQL Icon
SELECT * FROM users;-- Testing MySQL Icon
SELECT * FROM users;-- Testing MySQL Icon
SELECT * FROM users;-- Testing MySQL Icon
SELECT * FROM users;bind 127.0.0.1 -::1 192.168.100.65
bind-source-addr 192.168.100.63
protected-mode yes
port 6379bind 127.0.0.1 -::1 192.168.100.65
bind-source-addr 192.168.100.63
protected-mode yes
port 27017// Testing Supabase Icon
const { data } = await supabase.from('test').select();#Infrastructure as Code (IaC)
# Testing Terraform Icon
resource "aws_instance" "example" {}# Testing Terraform Icon
resource "aws_instance" "example" {}# Testing Ansible Icon (B&W Toggle)
- name: test playbook
hosts: allresource "aws_s3_bucket" "demo_bucket" {
# The bucket name is dynamically generated using the random_id resource
bucket = "opentofu-demo-bucket-${random_id.bucket_id.hex}"
}
resource "random_id" "bucket_id" {
byte_length = 8
}#Container
# --------
# 1. Builder
# --------
FROM oven/bun:1.2.23-alpine AS builder
# Add the link to your new repository here
LABEL org.opencontainers.image.source="https://github.com/username/velora"
WORKDIR /app
# Install dependencies using cached layer
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
# Copy all source
COPY . .
# Build Next.js
RUN bun run build
# --------
# 2. Runner
# --------
FROM oven/bun:1.2.23-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/static ./.next/static
EXPOSE 3000
CMD ["bun", "run", "server.js"]services:
app:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000services:
app:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000# Testing Kubernetes Icon
apiVersion: v1
kind: Pod# Testing Kubernetes Icon
apiVersion: v1
kind: Pod# Testing Argo Icon
apiVersion: v1
kind: Pod#CI/CD
workflow:
rules:
# MR pipelines
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# Branch/tag pipelines
- if: $CI_PIPELINE_SOURCE == "push"
# Default: skip
- when: never
stages:
- release
- build
variables:
GITLAB_TOKEN: $GITLAB_TOKEN
CI_REGISTRY_USER: $CI_REGISTRY_USER
CI_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD
CI_REGISTRY: $CI_REGISTRY
GIT_DEPTH: 100name: PR Build & Test
on:
pull_request:
branches:
- staging
- main
types:
- opened
- synchronize
- reopened
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
environment: ${{ github.base_ref }}
steps:
- name: Checkout repository
uses: actions/checkout@v4#Configuration
# Testing Nginx Icon
server {
listen 80;
}###--- MANAGEMENT CONFIGURATION ---####
#management.listener.ip = 127.0.0.1
management.listener.ssl = true
management.listener.port = 15672# server.properties Example
broker.id=0
listeners=PLAINTEXT://:9092
log.dirs=/var/lib/kafka/data
num.partitions=3
auto.create.topics.enable=true
zookeeper.connect=localhost:2181#Utility
# Testing Git Icon
git commit -m "Test icon"# Testing GitHub Icon (B&W Toggle)
ssh -T git@github.com# Testing GraphQL Icon
query { user { id } }npm i <package_name>name,age,city
John,30,New York
Jane,25,Los Angeles- const a = 1;
+ const a = 2;set number
syntax onRelated Posts
Syntax highlighting, line numbers, line highlights, word highlights
- Published On