Keep two separate remote one for google code and another for github.
git remote add origin <<your google code repo url>>
git remote add github <<your github repo url>>
Now you have two ways to sync the repos.
git remote update
This will fetch from all remote urls but won't merge. You have to merge the code manually. Alternatively if you need all the commits in both of your mirrors you can pull from them separately by specifying a branch name to which the the code to be merged (possibly master).
git pull origin master
git pull github master
pushing to multiple branches can be done as mentioned in the link in your question or using individual commands
git push origin master
git push github master