Skip to content

Instantly share code, notes, and snippets.

View janvhs's full-sized avatar
🌸
Wie ein Roboter von 1984

Jan Fooken janvhs

🌸
Wie ein Roboter von 1984
View GitHub Profile
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"strconv"
"strings"

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@janvhs
janvhs / trash-win.zig
Created March 22, 2023 08:34
Recycle File Winows
const std = @import("std");
const windows = std.os.windows;
/// Do a file operation using the Windows API.
/// It can, copy, move, rename, or delete a file or folder.
/// Since Windows Vista, it is recommended to use IFileOperation instead.
///
/// References:
/// - https://docs.rs/windows-sys/0.45.0/windows_sys/Win32/UI/Shell/fn.SHFileOperationA.html
/// - https://learn.microsoft.com/en-US/windows/win32/api/shellapi/nf-shellapi-shfileoperationa