C++ etc.
Tuesday, July 17, 2012
Print all variables in a Makefile
.PHONY: printvars
printvars:
@$(foreach V,$(sort $(.VARIABLES)),
$(if $(filter-out environment% default automatic,
$(origin $V)),$(warning $V=$($V) ($(value $V)))))
Friday, June 22, 2012
Sunday, April 29, 2012
Wednesday, December 14, 2011
Plot funny conditional stuff in gnuplot
plot "acc_len_acc_old_new11.txt" using 2:4:(+0):(-($4-$5)):((($2<=1)||($4<=1)||($4==$5))?(1/0):(($4 > $5) ? (rgb("0","255","0")): (rgb("255","0","0")))) notitle with vectors lc rgb variable,"acc_len_acc_old_new11.txt" using 2:5:(+0):(-($4-$5)):(($4!=$5)?(1/0):(($4 > $5) ? (rgb("0","255","255")):(rgb("255","0","255")))) notitle with vectors lc rgb variable, "acc_len_acc_old_new11.txt" using 2:(($4==$5 ? 5 : 1/0)) notitle with points pt 13 lc 13
Wednesday, December 7, 2011
PDFs to text to make them searchable on commandline
linse@elektrobier:~/Documents/cloned/diss/paper$ for f in *.pdf; do pdftotext $f; done
Sunday, November 13, 2011
NRG to ISO
Assuming the NRG is just a single session ISO CD image, you can just remove the first few kb with dd from Terminal.app
Code:
dd if=image.nrg of=cdrom.iso bs=512 skip=600
Code:
dd if=image.nrg of=cdrom.iso bs=512 skip=600
Friday, November 11, 2011
Game states
final int STATE_XBEE_INIT = 0;
final int STATE_PLAYER_LIST = 1;
final int STATE_LEVEL_SELECT = 2;
final int STATE_PLAY = 3;
final int STATE_HIGHSCORE = 4;
final int STATE_PLAYER_LIST = 1;
final int STATE_LEVEL_SELECT = 2;
final int STATE_PLAY = 3;
final int STATE_HIGHSCORE = 4;
Subscribe to:
Posts (Atom)