From e1c5bcb98584d03b7af6d6f1561b80d2241ad782 Mon Sep 17 00:00:00 2001 From: xAlpharax <42233094+xAlpharax@users.noreply.github.com> Date: Fri, 21 Feb 2025 23:20:43 +0200 Subject: Preapring for going live. Changes to be committed: modified: .gitignore modified: content/about.md new file: content/posts/Generating Functions.md new file: content/posts/Void Linux - A Comfy Guide.md modified: content/posts/_index.md renamed: content/posts/code_test.md -> content/posts/code-syntax-highlighting.md deleted: content/posts/some_cool_stuff.md modified: content/posts/typography.md new file: content/posts/youtube.md renamed: content/posts/How I made this Blog with Zola.md -> content/posts/zola-blog.md modified: static/Alphara.png --- content/posts/code-syntax-highlighting.md | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 content/posts/code-syntax-highlighting.md (limited to 'content/posts/code-syntax-highlighting.md') diff --git a/content/posts/code-syntax-highlighting.md b/content/posts/code-syntax-highlighting.md new file mode 100644 index 0000000..7df307d --- /dev/null +++ b/content/posts/code-syntax-highlighting.md @@ -0,0 +1,61 @@ ++++ +title = "Test Code Syntax Highlighting" +date = 2025-01-27 +draft = false + +[taxonomies] +tags = ["test-formatting"] + +[extra] +disable_comments = false +permalink = "https://alphara.art/posts/code-syntax-highlighting/" +toc = false + +[extra.earlier] +title = "Test Typography" +permalink = "https://alphara.art/posts/typography/" + +[extra.later] +title = "Test YouTube" +permalink = "https://alphara.art/posts/youtube/" ++++ + +```rust +fn factorial(n: u64) -> u64 { + match n { + 0 => 1, + _ => n * factorial(n-1) + } +} +``` + +```typescript +const sum = (n: number) => n * (n + 1) / 2 +``` + +```python +import os ; n_cores = os.cpu_count() // 2 ; + +from concurrent.futures import ThreadPoolExecutor + +with ThreadPoolExecutor(max_workers=n_cores) as executor: + executor.map(render, range(0, len(image_array))) +``` + +```zig +const std = @import("std"); + +pub fn main() void { + const user = User{ + .power = 9001, + .name = "Goku", + }; + + std.debug.print("{s}'s power is {d}\n", .{ user.name, user.power }); +} + +pub const User = struct { + power: u64, + name: []const u8, +}; +``` -- cgit v1.2.3