Beer
Not fit for a royal table. Beer is made from grain kernels cooked in water. The poskim discuss whether there is a problem of bishul akum. Most poskim agree there is no problem of bishul akum, for two main reasons. The first is because it is not fit for a royal table (תוס' ע''ז דף ל''א ע''ב ).
Main ingredient water. The second reason is that just as the grain is secondary to the water for the bracha—beer is Shehakol, not Mezonos—it is similarly secondary to the water for bishul akum (תוס' שם, ט''ז וש''ך סי' קי''ד ).
Coffee
The poskim discuss whether coffee is subject to the issur of bishul akum. The shaila is divided into multiple cases, as will be explained.
Coffee beans. Of course, there is no concern for bishul akum when coffee beans are roasted by non-Jews and a Jew uses the beans themselves to make himself coffee, as roasted beans are never eaten plain and are certainly not fit for a royal table (כף החיים סקכ''ג, דרכי תשובה סי' קי''ב סק''ב, שו''ת שבט הלוי ח''ב ס'י מ''ד ). When the Jew adds boiling water, he is cooking them himself.
Ready-to-drink coffee. Almost all poskim hold that if a non-Jew makes ready-to-drink coffee for a Jew, there is no problem of bishul akum, as the water is viewed as the main component and the coffee as secondary, just like beer (above, 32), which poses no problem of bishul akum (שו''ת רדב''ז ח''ג סי' תרל''ז, פר''ח סי קי''ד סק''ו, גליון מהרש''א, חכ''א כלל ס''ו סי' י''ד, שו''ת שבט הקהתי ח''ו סי' רע''ט, מרן פוסק הדור בתשובות והנהגות ח''א סי' תל''ז ).
However, some refrain from drinking coffee prepared by a non-Jew (ע''פ האריז''ל הובא בכף החיים סקכ''א, שו''ת פנים מאירות ח''ב סי' ס''ב הובא בפתח''ת ריש סי' קי''ד ). Some allow it to be drunk, but one should not drink it in a non-Jew’s house or coffee shop so as not to get close to them and act with frivolity (חכ''א שם ).