Skip to content

Instantly share code, notes, and snippets.

@4u9u5tsong
4u9u5tsong / linux
Created December 3, 2014 02:16
linux
* timeout command
kill the command after some specified time, to set a hard time limit for the executed command.
man timeout to read more.
@4u9u5tsong
4u9u5tsong / pdf
Last active August 29, 2015 14:09
pdf
* combine pdfs
pdfunite *.pdf all.pdf
@4u9u5tsong
4u9u5tsong / matlab
Last active August 29, 2015 14:09
matlab gists
* command line call
matlabc -nodesktop -nosplash -r "matlabpool 12;benchname = '$bench'; function_name ; quit"
* normcdf and precision
p = normcdf([256-56 256+56],256, sqrt(128));vpa(p(2)-p(1))
for k=50:56; p = normcdf([256-k 256+k],256, sqrt(128));display(vpa(p(2)-p(1))); end