Skip to content

Instantly share code, notes, and snippets.

View outsinre's full-sized avatar

Zachary Hu outsinre

View GitHub Profile
@outsinre
outsinre / sign.sh
Created February 25, 2025 03:50 — forked from ezimuel/sign.sh
Sign and verify a file using OpenSSL command line tool. It exports the digital signature in Base64 format.
#!/bin/bash
# Sign a file with a private key using OpenSSL
# Encode the signature in Base64 format
#
# Usage: sign <file> <private_key>
#
# NOTE: to generate a public/private key use the following commands:
#
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem
@outsinre
outsinre / nginx.gdb
Created August 29, 2024 08:18 — forked from chobits/nginx.gdb
nginx.gdb
# vim: set ft=gdb
set print pretty on
set pagination off
set print repeats 16
handle SIGPIPE nostop
### nginx debug function ###
@outsinre
outsinre / elf_format_cheatsheet.md
Last active June 11, 2024 14:57 — forked from x0nu11byt3/elf_format_cheatsheet.md
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@outsinre
outsinre / call-graph.awk
Last active April 7, 2024 09:01 — forked from outro56/call-graph.awk
Parse lua code and print call graph
#!/usr/bin/awk -f
#
# call_graph.awk
#
# Usage:
# ./call_graph.awk my_program.lua | dot -Tsvg > call_graph.svg
#
# This is a script that generates a visual call graph for a Lua file.
# This script only shows calls made to functions defined within the
# input Lua file; that is, it excludes calls such as standard library