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:
/* | |
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 | |
$ | |
*/ |
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 $@ | |
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; |
I hereby claim:
To claim this, I am signing this object:
#define _XOPEN_SOURCE | |
#include <assert.h> | |
#include <stdbool.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> |
#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> | |
#include <stdlib.h> | |
#define LEN(x) (sizeof(x)/sizeof((x)[0])) |
#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) |
#!/bin/sh | |
cmd=$1 | |
shift | |
# FIXME: it would be good for every argument to be wrapped in quotes | |
echo run $@ | gdb "$cmd" -x strace.gdb &> gdb-strace-log |