General rule of thumb is to use the LOWEST octane fuel available. The lower the octane, the more quickly the fuel burns and the more easily it ignites which generally results in a slightly lower HC number. Higher octane fuels resist ignition and burn more slowly.
Set your timing back as far as you can (10 degrees BTDC with spout out). The retarded timing reduces cylinder pressures/temps which does 2 things: 1) reduces the formation of NOx, and 2) carries more temperature into the header heating up the catalytic converter to be sure it's working properly.
Let the car idle for a good long while before the test. You want to be certain that the cats are good and hot before it's put on the sniffer.
They make special oxygenated additives for the fuel designed to help one pass emissions -- pick some up at your local parts place and follow the directions.
Be sure all the emissions equipment is in place and working properly - cats, air pump (hooked up), egr, pcv system, proper gas cap, charcoal cannister, etc.
Lastly -- have your paperwork handy on all the mods so you can show CARB numbers (California Air Resources Board) for all your changes. They may or may not give you a hard time on the visual -- but if they do and you don't have the right documentation - you may not even make it to the sniffer test.
Good luck with it.