Skip to content

Instantly share code, notes, and snippets.

/*
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE
Version 1, October 2013
Everyone is permitted to copy and distribute verbatim or modified copies
of this license document, and changing it is allowed as long as the name
is changed.
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE TERMS
AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION:
/*
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE
Version 1, October 2013
Everyone is permitted to copy and distribute verbatim or modified copies
of this license document, and changing it is allowed as long as the name
is changed.
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE TERMS
AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION:
0. You just DO WHAT THE FUCK YOU WANT TO.
/* Tiny calc
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char expr[100];
char op[100];
/*
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE
Version 1, October 2013
Everyone is permitted to copy and distribute verbatim or modified copies
of this license document, and changing it is allowed as long as the name
is changed.
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE TERMS
AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION:
/*
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE
Version 1, October 2013
Everyone is permitted to copy and distribute verbatim or modified copies
of this license document, and changing it is allowed as long as the name
is changed.
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE TERMS
AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION:
#include <iostream>
#include <numeric>
#include <vector>
#include <cstdlib>
#include <cassert>
#define cimg_display 3
#define cimg_use_png 1
#include <CImg.h>
@emu-san
emu-san / ANSI-color-codes.h
Created April 19, 2024 06:01 — forked from RabaDabaDoba/ANSI-color-codes.h
The entire table of ANSI color codes working in C!
/*
* 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"
@emu-san
emu-san / genpatch.sh
Created April 12, 2024 10:17
generate individual patch
#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
@emu-san
emu-san / .mediasizes
Created October 18, 2023 01:59
Media sizes 300 pixels per inch
# 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"
/* 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>