Dec
10
2010
It turns out that Internet Explorer caches AJAX requests (how clever). If you’re using $.ajax(), you can pass cache: false option to it, but if - like me - you’re using $.get() and $.post(), just use
$.ajaxSetup({cache: false});
somewhere at the start of your script.
Dec
08
2010
Mostly for my future reference. -threads 8 should be changed to the number of CPU cores (my i7 has 4 with HT, thus I set it to 8).
ffmpeg -i input.avi -acodec libfaac -ab 48k -vcodec libx264 -vpre fast -vb 500k -threads 8 -f flv output.flv
Jul
28
2010
Mostly note to my self for future reference.
What they don’t tell You in the tar backup tutorial is that it’s not enough to edit /etc/fstab (and their instructions for grub are for grub-legacy).
Because after restoring you probably have new partition UUIDs, you must:
- boot livecd
- mount your root fs
mount -B /dev /rootfs/dev, etc. (with proc and sys at least) to be able to chroot from livecd to your root fs
chroot /rootfs
- edit /etc/fstab and change UUIDs there (new ones you can get using
blkid
- do
sudo dpkg-reconfigure -plow grub-pc to automatically upgrade grub config files, just let it install to the drive(s) it was on
- do
update-initramfs -u so UUID stored inside initramfs get updated, too
Then you should be able to boot it.
Jul
08
2010
Install VirtualBox Guest Additions in Windows’ safe-mode so system file protection doesn’t interfere with the installation, it’s that simple and fixed all my VirtualBox performance problems.
Jun
26
2009
IE can’t do anything right. If you save some graphical elements to PNG, and try to put them on an area with CSS-defined color, there will be a difference even if you used the same color in the PNG — IE renders PNGs darker than it should.
The reason for this is misinterpretation of gAMA frame saved in PNGs that makes it possible to better color-match pictures. The fix is to remove this frame, and doing it on Ubuntu is as easy as:
aptitude install pngcrush
cd your-graphics-directory
mkdir fixed
find . -type f -exec pngcrush -d fixed -rem cHRM -rem gAMA -rem iCCP -rem sRGB {} \;
Now you have a “fixed” directory where you have PNGs that will work properly in IE (and are a bit smaller which is a nice side effect). If you’re sure they’re ok, just do
mv fixed/* ./
rmdir fixed
That’s all.