Like the examples in the link you mention yourself, first set the folders you DO want to sync with the ! marker and then ignore everything. I do it the following on my android in the .stignore:
// DON't ignore the following dirs (i.e. DO sync them):
!/DCIM
!/TitaniumBackup
// Ignore all the rest
*
That works for me…