Skip to content

Instantly share code, notes, and snippets.

@Max-E
Max-E / generate_exe_with_unmet_dependencies.sh
Last active August 11, 2019 21:01
Generate Linux executables with missing dependencies
#! /bin/bash
# USAGE:
# generate_exe_with_unmet_dependencies.sh OUTPUT_EXECUTABLE_NAME NUMBER_OF_DEPS
# Generates an executable with the specified file name, which will dynamically
# link against the specified number of libraries, These libraries will have
# randomly generated names. They'll be removed once the main executable is
# complete and should always be missing on anyone else's system; therefore the
# generated executable is guaranteed to always fail due to missing dynamic
# libraries.
@Max-E
Max-E / slowcp.c
Last active August 5, 2019 16:21
// Build: gcc -std=c11 -Wall -Wextra slowcp.c -o slowcp
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main (int argc, const char *argv[])
{
if (argc != 3) {
printf ("Usage: %s <src> <dst>:\n"
@Max-E
Max-E / concalc_wrap.sh
Last active April 6, 2020 00:37
concalc_wrap.sh - Turns Rainer Strobel's batch-mode concalc(1) utility into a useful interactive scientific and programming calculator.
#! /usr/bin/env bash
# DESCRIPTION
# concalc_wrap.sh - Turns Rainer Strobel's batch-mode concalc(1) utility into
# a useful interactive scientific and programming calculator.
# The script is also its own documentation.
# LICENSE