I employ this nifty method whenever I need to quickly garnish or decorate foods with thick sauces and frostings. For Japanese takoyaki dumplings, I use this method to squeeze out lines of mayonnaise to garnish the dumplings before serving.
Regardless of what you’re squeezing, use a freezer zip-top plastic bag as a makeshift pastry bag and nozzle. Put your squeezable ingredient in a corner of the bag. To fashion the pastry bag tip, snip a small hole – a scant 1/4 inch wide – at the corner so you can squirt the sauce or frosting out.
Go ahead and squeeze and you should get thin lines. Practice on a flat surface if you've never used a pastry bag before. Below are photos of this nifty method as applied to mayonnaise:
When using this method for decorating a cake, cupcake, or cookie, the lines will not be smooth and pretty as what you see in a bakery. If you’re going for perfection, put decorative pastry tip in the corner of the bag.