Skip to content

Instantly share code, notes, and snippets.

@KaneRoot
KaneRoot / hexdump.zig
Last active January 19, 2023 16:11 — forked from vmolsa/hexdump.zig
Hexdump written in zig
// Example: try hexdump(std.io.getStdOut().writer(), "Hello World", "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
//
// Hello World
//
// 0000: 4C 6F 72 65 6D 20 69 70 73 75 6D 20 64 6F 6C 6F Lorem ipsum dolo
// 0016: 72 20 73 69 74 20 61 6D 65 74 2C 20 63 6F 6E 73 r sit amet, cons
// 0032: 65 63 74 65 74 75 72 20 61 64 69 70 69 73 63 69 ectetur adipisci
// 0048: 6E 67 20 65 6C 69 74 2C 20 73 65 64 20 64 6F 20 ng elit, sed do
// 0064: 65 69 75 73 6D 6F 64 20 74 65 6D 70 6F 72 20 69 eiusmod tempor i
// 0080: 6E 63 69 64 69 64 75 6E 74 20
@KaneRoot
KaneRoot / unixToolbox.md
Created December 27, 2022 18:07 — forked from CodeWire/unixToolbox.md
Collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users.

#Unix Toolbox

This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.

##Unix Toolbox revision 14.4

The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the script example). See also the about page.
Error reports and comments are m
@KaneRoot
KaneRoot / zig_type_system.md
Created December 27, 2022 18:02 — forked from lobre/zig_type_system.md
Zig type system illustrated using ascii diagrams

Zig Type System

Zig aims to be a simple language. It is not easy to define what simple exactly means, but zig is also a low-level programming language that aims for c-compatibility. To reach this goal, it needs good semantics in its type system so that developers have a complete toolbox to manipulate data.

So types in zig are composable, but this can become rapidly overwhelming. See those examples. Are you able to understand them at a glance, as soon as you read them?

*const ?u8
?*const u8
*const [2]u8