This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Compile | |
| /* rm -f libsanctlua.so ; \ */ | |
| /* gcc -shared -fPIC -Wall -Wextra -Werror -std=c99 \ */ | |
| /* -I./tools/luasrc/lua55/include \ */ | |
| /* -o libsanctlua.so libsanctlua.c \ */ | |
| /* -L./tools/luasrc -llua55 \ */ | |
| /* -Wl,-rpath,./tools/luasrc */ | |
| // Lua auxilary library header, includes most of the typedefs and definitions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| static const char *const g_hextable = "0123456789abcdef"; | |
| static void | |
| ft_putaddr(unsigned char *buffer, unsigned long addr, | |
| unsigned char *buffer_index) | |
| { | |
| char shift; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################################################################################ | |
| # Project Metadata # | |
| ################################################################################ | |
| AUTHOR := yigtuyumz | |
| VERSION_MAJOR := 1 | |
| VERSION_MINOR := 0 | |
| VERSION_PATCH := 0 | |
| VERSION := $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH) | |
| NAME := sanctmake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################################################### | |
| # ARCH LINUX - UEFI + GRUB + BTRFS + PHYSICAL SWAP + ZRAM | |
| ############################################################################### | |
| ############################################################################### | |
| # PRE-INSTALLATION: PREPARE INSTALLATION MEDIA (ON HOST MACHINE) | |
| ############################################################################### | |
| # Replace /dev/sda with your actual USB drive identifier | |
| sudo dd if=/path/to/archlinux.iso of=/dev/sda bs=4M status=progress oflag=sync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| print_help() { | |
| cat <<EOF | |
| Usage: $0 -m <MIN> -M <MAX> [OPTIONS] | |
| Generate a list of unique random numbers and optionally pass them as arguments | |
| to a program. If no program is specified, './a.out' is used by default. If this | |
| file does not exist or is not executable, the generated list is printed to the | |
| STDOUT. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* compile it via gcc my_alloc.c -lpthread */ | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <sys/mman.h> | |
| #include <errno.h> | |
| #include <pthread.h> | |
| typedef struct header_s { | |
| size_t size; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AS := nasm | |
| ASFLAGS := -felf64 -O0 -dwarf -g | |
| LD := ld | |
| LDFLAGS := | |
| ASM_SRCS := div.s | |
| ASM_OBJS := $(ASM_SRCS:.s=.o) | |
| ASM_EXEC := $(ASM_SRCS:.s=) | |
| TARGET := $(ASM_EXEC) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| usage() { | |
| echo "Usage: ${0} [OPTION]... [PATH] [N]" | |
| echo | |
| echo "List the N largest files in a given directory." | |
| echo | |
| echo "Arguments:" | |
| echo " PATH The directory to search for files (required)." | |
| echo " N The number of largest files to list (required)." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # For the first time run, don't use this script!!! Use: | |
| # qemu-system-x86_64 -m 1024 -nographic -serial mon:stdio | |
| SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) | |
| # QEMU binary | |
| QEMU="qemu-system-x86_64" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # FreeBSD Network Interface Configuration | |
| # Feel free to set your settings for inet, netmask and defaultrouter. | |
| # This script modifies em0 interface only. (Soon, interface name can be configured.) | |
| # inet: IPv4 Address for the interface | |
| # netmask: subnet mask for the interface | |
| # defaultrouter: network gateway address | |
| # |
NewerOlder