Skip to content

Instantly share code, notes, and snippets.

View b3yc0d3's full-sized avatar
πŸ³οΈβ€πŸŒˆ

Nik K. b3yc0d3

πŸ³οΈβ€πŸŒˆ
View GitHub Profile
@coolaj86
coolaj86 / posix-bsd-flags.md
Last active January 4, 2026 16:11
POSIX, BSD, GNU, & IEEE Standard Command Line Flags & Options

POSIX & BSD Standard Command Line Flags & Options

The vital resource for developers creating new command-line tools to learn the wisdom of the ancients.

All programs should universally implement these flags:

  • -V (uppercase), --version, version
  • --help, help (also the default if nothing is given)
  • -- stop processing flags; treat all else as raw arguments
@thebino
thebino / Cargo.toml
Last active April 27, 2025 14:51
[Rust] Testing multipart/form-data with axum
[package]
name = "test-multipart"
version = "0.1.0"
edition = "2021"
[dependencies]
axum = { version = "0.6.20", features = ["multipart"] }
tokio = { version = "1.32.0", features = ["full"] }
mime = "0.3.17"
log = "0.4.20"
@tarleb
tarleb / custom-markdown.lua
Last active November 3, 2024 06:18
Custom Lua writer, using the `layout` module to produce nicely layed-out Markdown.
-- This is a sample custom writer for pandoc, using Layout to
-- produce nicely wrapped output.
local layout = pandoc.layout
local text = pandoc.text
local type = pandoc.utils.type
local l = layout.literal
-- Table to store footnotes, so they can be included at the end.
@miguelmota
miguelmota / external_link_arrow.txt
Last active March 21, 2026 13:05
Unicode UTF-8 external link arrow symbol (closest thing to it)

Shell scripting with Markdown documents

alias ~~~=":<<'~~~sh'";:<<'~~~sh'

@roalcantara
roalcantara / XDG.cheat-sheet.md
Last active March 16, 2026 17:08
XDG cheat sheet

XDG - Base Directory Specification (extended)

Directories

Base

The intended use-case for BaseDirectories is to query the paths of user-invisible standard directories that have been defined according to the conventions of the operating system the library is running on.

@ostinelli
ostinelli / rsa_openssl_for_python.md
Last active December 17, 2024 12:11
RSA Private / Public key pair with openssl & Python

RSA Private / Pubic key pair

To generate a private / public RSA key pair, you can either use openssl, like so:

$ openssl genrsa -out private.pem 4096  
$ openssl rsa -in private.pem -outform PEM -pubout -out public.pem  

Or, you can use the following python script:

@thatisuday
thatisuday / load-wasm.js
Last active June 18, 2025 17:22
A simple example of loading WebAssembly using fetch API
fetch( '/calc.wasm' ).then( ( response ) => {
return response.arrayBuffer(); // convert stream to ArrayBuffer
} ).then( ( wasmBuffer ) => {
return WebAssembly.instantiate( wasmBuffer ); // compile and instantiate WASM module
} ).then( ( { instance, module } ) => {
console.log( instance.exports.add( 1, 2 ) ); // 3
} );
@gabrielfalcao
gabrielfalcao / rsa_encryption.py
Created November 30, 2019 00:39
Using python cryptography module to generate an RSA keypair, serialize, deserialize the keys and perform encryption and decryption
import base64
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
def utf8(s: bytes):
return str(s, 'utf-8')
@Fuwn
Fuwn / Memory.h
Last active September 26, 2022 20:07
CSGO Memory Addressing
#pragma once
#include <Windows.h>
#include <TlHelp32.h>
#include <iostream>
class MemoryManager {
private:
DWORD dwPID; // CS:GO process ID