Skip to main content


Showing posts from March, 2012

Repair GRUB2 Boot

After installing Ubuntu next to Linux Mint, Ubuntu started to be default option.

It was annoying :)

I started to search how to deal with GRUB2, but the problem was about installing grub from Mint partition.

The easiest solution is to install Boot Repair:

I've found it on Ubuntu forum:

I can recommend it, really worked from first try :)

Install in Ubuntu:
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update && sudo apt-get install -y boot-repair && boot-repair

HTML5 MMO - Browser Quest

Mozilla created HTML5 MMO game. I've tried it in Chrome and it works so +1 for cross browser game.

Sources are on github:

To learn more see:

My Meet.JS Presentation

How to Test? Is unit testing really helpful?

My presentation form last Meet.JS: (in Polish)

Presentation is about Testing, not only about JavaScript, but in general.
I must admit that I was influenced by inventing-on-principle by Bret Victor

Hopefully this presentation encourage people to think about testing as a way to speed up development, not as a  cost :-)

If you attended last Meet.JS let me know what you think, I wasn't as good as Bret so I will be glad for comments how to be better :-)

netbeans.conf - How to make NetBeans faster

I've started to experimenting with NetBeans again, but for that I need to make NetBeans faster...

Consider adding to your /etc/netbeans.conf minimal and maximal Heap sizes (larger than default).
-J-Xms256m  start level
 -J-Xmx1024m maximum
Adjust it to your RAM, and current memory usage.

on Windows 7:
netbeans_default_options="-J-client -J-Xss2m -J-Xms128m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Xverify:none -J-Xmx512m -J-XX:CompileThreshold=100 -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled "

Ideas from:

Beware that on LinuxMint I used only

-J-Xms512  -J-Xmx2048m
without GC and CompileTreshold due to slowdown of IDE and whole system (100% CPU without reason).

The best idea is to experiment and try on your machine.

Furthermore consider disabling as much Plug…

Learn WebGL with Erik Moller

A WebGL instructional video by Erik Moller.
I think that this is awesome opportunity to learn WebGL! Watching video is really easy, and with just that you can learn basics of WebGL. 
Of course WebGL is supposed to be low-level API and I suggest to use Library like THREE.js or J3D, but ability to know what this libraries are doing can be really helpful.

Learn Backbone with Code School

Awesome course of Backbone:

Looks really impressive, added to my todo list. For now I must prepare slides for sunday meet.js barcamp :)

Missing GPG keys

Recently I've been annoyed by missing GPG keys in Linux Mint.

Fortunately there are existing solutions: But it worked when I changed keyserver to: 
$ sudo apt-get update 2> /tmp/keymissing; for key in $(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); do echo -e "nProcessing key: $key"; gpg --keyserver --recv $key && gpg --export --armor $key | sudo apt-key add -; done
Or You can try: But first command worked for me.

getElementById - how to check it

How to deal with getElementById Recently I found code:

var d = document; function doSomething(name){ if( typeof document.getElementById(name) != 'undefined' ) document.getElementById('innerFrame_'+name).src=document.getElementById('innerFrame_'+name).src }

For me there are problems in this code...

getElementById can return only element itself or null.
var d = document; function doSomething(name){ if( document.getElementById(name) ) document.getElementById('innerFrame_'+name).src=document.getElementById('innerFrame_'+name).src } Null is falsy, Element as Object is always truthy. Just use it as if condition.
Logical problem in if condition and it's contents. I realized that function changes different element that it is testing for existence. The best option is to stop testing for existence of element by id of name, and check only for 'innerFrame_'…