Skip to content

Instantly share code, notes, and snippets.

Fib(0 * 10): 0
Fib(1 * 10): 55
Fib(2 * 10): 6765
Fib(3 * 10): 832040
Fib(4 * 10): 102334155
Fib(5 * 10): 12586269025
Fib(6 * 10): 1548008755920
Fib(7 * 10): 190392490709135
Fib(8 * 10): 23416728348467685
Fib(9 * 10): 2880067194370816120
alias ssh_gaul="export TERM=xterm && ssh USER_NAME@obelix.gaul.csd.uwo.ca"
@nwjsmith
nwjsmith / gist:78305
Created March 12, 2009 21:44
Some macros for making system calls less verbose
#define TRY_ASSIGN(v, x) do { \
v = x; \
if (v == -1) { \
fprintf(stderr, # x ": %s\n", strerror(errno)); \
exit(EXIT_FAILURE); \
} \
} while (0)
#define TRY(x) do { int unused; TRY_ASSIGN(unused, x); } while (0)