Skip to content

Instantly share code, notes, and snippets.

View pendingchaos's full-sized avatar

PendingChaos pendingchaos

  • Earth
View GitHub Profile
@pendingchaos
pendingchaos / Makefile
Last active April 23, 2016 12:35
A Makefile
CFLAGS = -pedantic -Wall -std=c11 -g
LDFLAGS =
OUTPUT =
RUN_OPT =
PREFIX ?= /usr/local
TARGET = $@
PREREQ1 = $<
src = $(wildcard src/*.c)
@pendingchaos
pendingchaos / path.c
Created March 29, 2016 09:34
An extremely compact PATH implementation
#include<stdio.h>
#define A while((z=getc(f))^EOF)if(z=='\n')++Y,X=0;else{if
#define Z x+=(K&3)-1,y+=(K>>3)-1
#define J :z==
#define v m[C]
int m[30000];size_t s,C,r=1,K=10,x,y,X,Y=1;int main(int l,char**u){FILE*f=fopen(u[1],"r");char z;A(z=='$')break;++X;}x=X;y=Y;while(r){rewind(f);X=0,Y=1;A(X==x&Y==y)break;++X;}z=='#'?r=0 J'+'?v++J'-'?v--J'}'?C++J'{'?C--J','?v=getchar()J'.'?putchar(v)J'/'?K=K==10?1:K==17?8:K==8?17:10 J'\\'?K=K==10?17:K==17?10:K==8?1:8 J'^'?K=v?1:K J'<'?K=v?8:K J'>'?K=v?10:K J'v'?K=v?17:K J'!'?Z:0;Z;}return fclose(f);}
@e7d
e7d / remove-obsolete-gpg-key-from-dnf.md
Last active April 19, 2025 04:37
Remove obsolete GPG key from DNF (Fedora)