Skip to content

Instantly share code, notes, and snippets.

@CodeByAidan
CodeByAidan / Center-No-Vert-Bar-H1-H2.md
Last active September 6, 2025 02:35
No vertical bar for h1 and h2 with GitHub Markdown, fixed!

    Hi, I'm Aidan

@przepompownia
przepompownia / .editorconfig
Last active August 31, 2025 11:48
Nvim 0.11-dev - minimal example for built-in completion/expanding snippets with lua-ls
# see https://github.com/CppCXY/EmmyLuaCodeStyle/blob/master/lua.template.editorconfig
[*.lua]
indent_style = space
indent_size = 2
tab_width = 2
quote_style = single
call_arg_parentheses = keep
continuation_indent = 2
align_call_args = false
align_function_params = true
@mmyoji
mmyoji / migrate-npm-to-pnpm.md
Last active January 13, 2026 07:18
Migrate npm to pnpm
@ssalbdivad
ssalbdivad / ArkTypeVsZod.md
Last active December 10, 2025 03:53
ArkType/Zod Comparison

Here's a comparison between how the same simple user definition would be defined using ArkType and Zod:

image

ArkType's definition syntax is more concise (definitions are about 50% shorter on average) as well as making it more visually obvious what the inferred TypeScript type will be. The ability to infer TypeScript definitions directly is the same, but ArkType's syntax is again more concise by allowing you to use typeof on a property of arkUser directly instead of using an extra "infer" helper.

In general, we also have taken significant steps to optimize and clarify our type hints when hovering over validators. For example, in the case above, this is what you see when you mouse over "zodUser":

image

@Reijaff
Reijaff / string_obfuscation.zig
Created September 8, 2022 16:15
primitive compile time string obfuscation in zig
const std = @import("std");
fn encrypt(comptime string: []const u8) []const u8{
var new_string: [string.len]u8 = undefined;
for (string) |chr, idx|{
new_string[idx] = chr ^ 0xff;
}
return &new_string;
@Albert221
Albert221 / JetBrains-Mono.css
Last active August 11, 2025 11:36
CSS for using JetBrains Mono on the Web. Simply copy&paste it to your stylesheet.
@font-face {
font-family: 'JetBrains Mono';
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold-Italic.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff') format('woff');
font-weight: 700;
font-style: italic;
font-display: swap;
}
@font-face {
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active January 24, 2026 03:23
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@wojteklu
wojteklu / clean_code.md
Last active January 24, 2026 09:20
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules