We study two types of asymptotic problems whose common feature - and difficulty- is to exhibit oscillating Dirichlet boundary conditions : the main contribution of this article is to show how to recover the Dirichlet boundary condition for the limiting equation. These two types of problems are (i) periodic homogenization problems for fully nonlinear, second-order elliptic partial differential equations set in a half-space and (ii) parabolic problems with an oscillating in time Dirichlet boundary condition. In order to obtain the Dirichlet boundary condition for the limiting problem, the key step is a blow-up argument near the boundary which leads to the study of Dirichlet problems set on half space type domains and of the asymptotic behavior of the solutions when the distance to the boundary tends to infinity.