This file contains 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
/* | |
* This is free and unencumbered software released into the public domain. | |
* | |
* For more information, please refer to <https://unlicense.org> | |
*/ | |
//Regular text | |
#define BLK "\e[0;30m" | |
#define RED "\e[0;31m" | |
#define GRN "\e[0;32m" |
This file contains 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
#set -e | |
#usage old_directory new_directory | |
modfiles=$(find ${2} -type f -exec grep -Iq . {} \; -print) | |
#origfiles=${modfiles//$2/$1} | |
rm patchfiles -rf | |
mkdir patchfiles | |
echo $modfiles |
This file contains 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
# MEDIA SIZE 300 pixels per inch | |
export LETTER="2550x3300" | |
export LONG="2550x3900" | |
export LEGAL="2550x4200" | |
export A4="2490x3510" | |
export 3R="1050x1500" | |
export 4R="1200x1800" | |
export 5R="1500x2100" |
This file contains 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
/* gcc wmain2.c tracer.c utils.c math.c -fopenmp -lm -lmingw32 -lSDL2main -lSDL2 | |
* -mwindows -Dmain=SDL_main -o wmain2 */ | |
#include "common.h" | |
#include <SDL2/SDL.h> | |
#include <assert.h> | |
#include <process.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> |
This file contains 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
/* rgb2vga.c - converts rgb values to vga 256. */ | |
/* Copyright (c) 2023 Al-buharie Amjari */ | |
/* Released under MIT License */ | |
#include <math.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#define F(x) ((float)x) |
This file contains 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
import png | |
from ctypes import * | |
""" | |
struct vec3D { | |
double x, y, z; | |
}; | |
/* A triangle is composed of 3D vertices */ | |
struct triangle3D { | |
struct vec3D *vertex[3]; |
This file contains 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
/* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or distribute | |
* this software, either in source code form or as a compiled binary, | |
* for any purpose, commercial or non-commercial, and by any means. | |
* | |
* In jurisdictions that recognize copyright laws, the author or authors of | |
* this software dedicate any and all copyright interest in the software to | |
* the public domain. We make this dedication for the benefit of the public | |
* at large and to the detriment of our heirs and successors. We intend |
This file contains 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 <math.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define M 256 | |
#define P 2048 | |
/* Possible 256 values from 0 to 255*/ | |
#define V 256 |
This file contains 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
/* Notch filter at 10000Hz */ | |
#include <stdio.h> | |
#include <complex.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <assert.h> | |
int main(int argc, char *argv[]){ | |
assert(argc == 2); |
This file contains 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
LDFLAGS = -lm | |
CFLAGS = -O3 | |
main: main.c defs.o | |
defs.o: ir.raw out.raw | |
$(LD) -r -b binary $^ -o $@ |
NewerOlder