Skip to content

Instantly share code, notes, and snippets.

View Theldus's full-sized avatar
🙃

Davidson Francis Theldus

🙃
View GitHub Profile
@bvisness
bvisness / wasm_in_ci.md
Last active December 21, 2024 19:33
A quick guide to running wasm files outside the browser

General info

The following code should work to test WebAssembly in various JS runtimes with minor modifications:

const bytes = /* read a .wasm file somehow */;
const mod = new WebAssembly.Module(bytes);
const instance = new WebAssembly.Instance(mod, { /* imports */ });

const { foo, bar } = instance.exports;
@0neday
0neday / stunnel-aarch64.sh
Last active December 28, 2024 17:39
Cross compile statically stunnel for aarch64
### just for arm64
````
BASE=`pwd`
## cross-compile toolchain
git clone https://github.com/0neday/buildroot
cd buildroot
make menuconfig
### select aarch64 and enable ssp , c++ support
make -j$(nproc) toolchain
@Yousha
Yousha / BIOS_default_passwords.txt
Created June 16, 2020 08:51
BIOS default passwords
AWARD BIOS:
01322222
589589
589721
595595
598598
aLLy
aLLY
ALLY
ALFAROME
@bagder
bagder / tinycurl.sh
Last active July 12, 2024 12:51
build a tiny curl (on Linux)
#!/bin/sh
export CFLAGS="-Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -flto"
export LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
./configure \
--disable-cookies \
--disable-crypto-auth \
--disable-dict \
--disable-file \
--disable-ftp \
--disable-gopher \
@MatanShahar
MatanShahar / target.xml
Last active November 1, 2024 22:06
GDB qXfer target description for real-mode qemu
<?xml version="1.0"?>
<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. -->
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
<architecture>i8086</architecture>
@fnky
fnky / ANSI.md
Last active April 21, 2025 18:34
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@baiwfg2
baiwfg2 / CMakeLists.txt
Created September 29, 2018 12:42
How to use add_custom_target and add_custom_command correctly in cmake
# References:
# https://cmake.org/cmake/help/latest/command/add_custom_target.html
# https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/
# https://gist.github.com/socantre/7ee63133a0a3a08f3990
# https://stackoverflow.com/questions/24163778/how-to-add-custom-target-that-depends-on-make-install
# https://stackoverflow.com/questions/30719275/add-custom-command-is-not-generating-a-target
# https://stackoverflow.com/questions/26024235/how-to-call-a-cmake-function-from-add-custom-target-command
# https://blog.csdn.net/gubenpeiyuan/article/details/51096777
cmake_minimum_required(VERSION 3.10)
@mts0629
mts0629 / jpegtest.c
Last active December 20, 2021 02:37
Read/write JPEG image with libjpeg
/*********************************
jpegtest.c
$ gcc jpegtest.c -std=c11 -ljpeg
*********************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <jpeglib.h>
@mcspring
mcspring / Makefile
Created June 26, 2018 07:36
Static build of nginx with custom openssl, pcre and zlib
# Author: Eric Pruitt (http://www.codevat.com)
# License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
# Description: This Makefile is designed to create a statically linked nginx
# binary without any dependencies on the host system's version of glibc.
NGINX_VERSION=1.15.0
OPENSSL_VERSION=1.0.2o
PCRE_VERSION=8.42
ZLIB_VERSION=1.2.11