Almost done with stretching (same as scaling but less high-brow) matrices https://bitbucket.org/emilper/zug-matrix.
Also perfected a method to write correct code while very tired: write tests with what you expect to get while still awake, then scramble the code around until you stumble upon a not-completely-disgusting solution and the tests pass. Maybe I should pattent it ?
Friday, December 14, 2018
Tuesday, October 2, 2018
DBD::mysql failing with mariadb on debian/ubuntu/friends
If installing DBD::mysql build fails on debian/ubuntu/etc. when you have mariadb-server installed, you might need libmariadb-dev-compat .
Monday, April 16, 2018
getting tired of being victimized by overeager JS developers I am taking a hard look at Javascript/Node environment
to keep it real and eat my own dog food I published some code on npm https://www.npmjs.com/package/matrix-mab
may the FSM have mercy of my developer karma :)
to keep it real and eat my own dog food I published some code on npm https://www.npmjs.com/package/matrix-mab
may the FSM have mercy of my developer karma :)
Friday, August 11, 2017
dlang - retrieve struct from void pointer passed to extern (C) function
struct Data { int depth; } extern (C) void startElement(void* userData, const(char)* name, const(char*)* atts) nothrow { Data user_data = (*cast(Data*) userData); user_data.depth++; // and so forth
I do not know if this is the right way to do it but it seems to work.
Friday, July 28, 2017
count unique values in rows with bash, grep and awk
cat /some/file/path.txt | awk '{ print $5}' | uniq -c
Sunday, July 16, 2017
backup sites with cron and ssh
# m h dom mon dow command
33 0 * * * /usr/bin/ssh root@lunch-break.ro "/bin/tar czf - /home/www/bla " > \ /home/emilper/backup/bla/www_bla_`date +\%Y-\%m-\%d_\%H-\%M-\%S`.tar.gz 2>>/tmp/cron.log 52 0 * * * /usr/bin/ssh root@lunch-break.ro "mysqldump -u root -pblabla --opt bla_db | \ gzip -9c " > /home/emilper/backup/bla/bla_db_mysql_dump_`date +\%Y-\%m-\%d_\%H-\%M-\%S`.gz \ 2>>/tmp/cron.log
Saturday, July 8, 2017
perl compiled under 5 minutes with perlbrew on a Ryzen 7
emilper@home ~ $ time perlbrew install -j8 -Dusethreads -Duselargefiles -Dcccdlflags=-fPIC -Duse64bitint -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Doptimize=-O2 -Duseshrplib perl-5.20.3
Installing /home/emilper/perl5/perlbrew/build/perl-5.20.3 into ~/perl5/perlbrew/perls/perl-5.20.3
This could take a while. You can run the following command on another shell to track the status:
tail -f ~/perl5/perlbrew/build.perl-5.20.3.log
perl-5.20.3 is successfully installed.
real 3m50.827s
user 10m8.356s
sys 0m39.784s
Subscribe to:
Posts (Atom)