Fixing android.process.media has stopped on Lollipop

Another fix for “The process android.process.media has stopped unexpectedly…” that can (also) appear after you upgrade to Lollipop (Android 5.0) from some lower Android version without doing factory reset. Try to uninstall “DRM Protected Content Storage” app via Settings -> Apps. In my case, this was a left-over of Android 4.3, and android.process.media had some […]

firefox 31 + self-signed certificate = sec_error_ca_cert_invalid

If you are trying to access site with self-signed certificate with Firefox 31 (or later) and get Issuer certificate is invalid error (sec_error_ca_cert_invalid), you have to disable new mozilla::pkix certificate verification. In about:config set security.use_mozillapkix_verification = false To find out more about mozilla::pkix and why your firefox just got so super secure and paranoid, that […]

Simple XSLT ifnull for numbers

Answer to question how to display zero instead of NaN in XSLT for non existing node containing number values (kind of ifnull or coallesce functions that are available in SQL). You can do it by standard expressive XSLT way, with using variable and <xsl:choose>, or abuse built-in sum() function and do whole thing in one […]

Fixing pg_dump invalid memory alloc request size

I’ve encountered unusual problem while dumping one of the bigger PostgreSQL databases. Every try to run pg_dump resulted in this: sam@cerberus:~/backup$ pg_dump -v -c js1 >x pg_dump: Error message from server: ERROR: invalid memory alloc request size 18446744073709551613 pg_dump: The command was: COPY job.description (create_time, job_id, content, hash, last_check_time) TO stdout; pg_dump: *** aborted because […]

Monitoring disk drives via collectd

I’ve made two simple (but useful) disk drive monitoring scripts for collectd exec plugin. You can find them on http://devel.dob.sk/collectd-scripts/. smartmon.sh This script monitors SMART attributes of given disks using smartctl (smartmontools). megamon.sh This one monitors some interesting values of MegaRaid adapter physical drives using MegaCli tool.   Description how to use them can be […]

gentoo + xen compilation problems

If you get following compilation error while emerging xen (resp. xen-tools): arch/i386/core/cpu.c: In function ‘get_cpuinfo’: arch/i386/include/bits/cpu.h:79:2: error: can’t find a register in class ‘BREG’ while reloading ‘asm’ arch/i386/include/bits/cpu.h:79:2: error: can’t find a register in class ‘BREG’ while reloading ‘asm’ arch/i386/include/bits/cpu.h:79:2: error: can’t find a register in class ‘BREG’ while reloading ‘asm’ arch/i386/include/bits/cpu.h:79:2: error: can’t find […]