It's always best to make up a batch of garlic/ginger with a blender/hand blender/mixer, and freeze it. It's nigh on impossible to make a paste of these ingredients (especially the ginger) in small quantities.
Although various recipies call for different ratios of these ingredients, unless one of them is a particular focus of the dish, I find a 50/50 mix works well (of course, you may prefer a different ratio or even more than 1).
Whenever required, I get about 150 grms each of peeled ginger and garlic, chop them up, place them in the container that comes with a hand blender with some oil, and puree them. I then use some, and freeze the rest in an ice cube tray.
I also make some cubes with chilli added before pureeing, as fresh chilli has a better flavour than dried, and a little is appropriate in many dishes.