Skip to content

Instantly share code, notes, and snippets.

View TorNATO-PRO's full-sized avatar
👨‍🔬
Busyworking

Nathan Waltz TorNATO-PRO

👨‍🔬
Busyworking
View GitHub Profile
@TorNATO-PRO
TorNATO-PRO / makefile
Last active October 5, 2021 17:57
Redesigning an instruction set found at https://www.cs.swarthmore.edu/~newhall/unixhelp/howto_makefiles.html#adv for an English class.
make
# A specific target in the Makefile can be executed by typing:
make target_label
# For example, to execute the rm commands in the example C/C++ Makefiles below, type:
make clean
# comment
# (note: the <tab> in the command line is necessary for make to work)
target: dependency1 dependency2 ...
<tab> command
# an example entry
example entry:
# target entry to build program executable from program and mylib
# object files
# build an executable named myprog from myprog.c
all: myprog.c
gcc -g -Wall -o myprog myprog.c
clean:
$(RM) myprog
# the compiler: gcc for C program, define as g++ for C++
CC = gcc
# compiler flags:
# -g adds debugging information to the executable file
# -Wall turns on most, but not all, compiler warnings
CFLAGS = -g -Wall
# the build target executable:
TARGET = myprog
#
# This is an example Makefile for a countwords program. This
# program uses both the scanner module and a counter module.
# Typing 'make' or 'make count' will create the executable file.
#
# define some Makefile variables for the compiler and compiler flags
# to use Makefile variables later in the Makefile: $()
#
# -g adds debugging information to the executable file
# 'make depend' uses makedepend to automatically generate dependencies
# (dependencies are added to end of Makefile)
# 'make' build executable file 'mycc'
# 'make clean' removes all .o and executable files
#
# define the C compiler to use
CC = gcc
# define any compile-time flags
#
# A simple makefile for compiling three java classes
#
# define a makefile variable for the java compiler
#
JCC = javac
# define a makefile variable for compilation flags
# the -g flag compiles with debugging information
@TorNATO-PRO
TorNATO-PRO / main.c
Created April 5, 2022 23:20
A snake program I threw together for a cyber security thing.
/**
* @file main.c
*
* @author Nathan Waltz (nathan.waltz@wsu.edu)
* @brief A snake game to demonstrate a covert channel.
* @version 0.1
* @date 2022-04-05
*
* @copyright Copyright (c) 2022
*
-- In memory REST API for getting Animal information.
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TypeOperators #-}
module SimpleAnimalAPI