In the bowl of an electric mixer, beat butter and cream cheese together until smooth. Add in vanilla. With the mixer on low speed, slowly add powdered sugar 1/2 cup at a time and add cocoa powder, increasing the speed to mix. If the frosting it a bit too thick, add milk 1 teaspoon at a time, until desired consistency is reached. If it is too thin, add additional sugar gradually. Frost cupcakes once cooled. Top with chocolate shavings.