Skip to content

Instantly share code, notes, and snippets.

@buffet
Created October 13, 2018 15:03
Show Gist options
  • Save buffet/0e2b9324e9c37766a93828d73619cd00 to your computer and use it in GitHub Desktop.
Save buffet/0e2b9324e9c37766a93828d73619cd00 to your computer and use it in GitHub Desktop.
leberkaes
#include <ncurses.h>
int
main(void)
{
int ch;
initscr();
cbreak();
noecho();
keypad(stdscr, TRUE);
for (;;) {
ch = getch();
addch(ch);
putc(ch, stderr);
fflush(stderr);
refresh();
}
}
@buffet
Copy link
Author

buffet commented Oct 13, 2018

Compile with: make LDFLAGS="-lncurses" leberkaes
Usage: leberkaes 2> file or leberkase 2>> file

Deletion is handles via sed or similar, which handle regex way better, and allow to fix stuff without having to move around to much, so this is actually a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment