I hereby claim:
- I am hadrianw on github.
- I am hawski (https://keybase.io/hawski) on keybase.
- I have a public key ASB7SqEkozW7v4jD75NZ4Mzrfz_OAY2jwl2v0SQkcI47TQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #include <ftw.h> | |
| #include <stdio.h> | |
| #include <sqlite3.h> | |
| #define INSERT_QUERY "INSERT INTO index VALUES (?, ?)", | |
| static sqlite3 *db; | |
| static sqlite3_stmt *insert_stmt; | |
| static int step(const char *path, const struct stat *sb, int flag, struct FTW *ftwbuf) |
| var d=document; | |
| var q=d.querySelector.bind(d); | |
| var c='width=device-width,initial-scale=1'; | |
| var v=q('meta[name=viewport]'); | |
| if(v){ | |
| v.content=c | |
| }else{ | |
| v=d.createElement('meta'); | |
| v.name='viewport'; | |
| v.content=c; |
| #if 0 | |
| set -e; [ "$0" -nt "$0.bin" ] && | |
| gcc -Wall -Wextra -pedantic -std=c99 "$0" -o "$0.bin" | |
| exec "$0.bin" "$@" | |
| #endif | |
| #include <stdio.h> | |
| int | |
| main(int argc, char *argv[]) { |
| all: | |
| make $$(for i in *.c; do echo $${i%.c}; done) | |
| .c: Makefile | |
| gcc -std=c99 -pedantic -Wall -Wextra $< -o $@ | |
| .PHONY: all |
| .c: Makefile | |
| gcc -std=c99 -pedantic -Wall -Wextra $< -o $@ | |
| /* | |
| Compile with: | |
| $ gcc prace.c -o prace -std=c99 -pedantic -Wall -Wextra | |
| Example usage in shell script: | |
| $ ((sleep 4; echo foo)& (sleep 2; echo bar)& exec ./prace) | |
| bar | |
| $ | |
| */ |