Psalm 18:30 (NIV)
30 As for God, his way is perfect: The LORD’s word is flawless; he shields all who take refuge in him.

Explained:
18:29-50 When we praise for one mercy, we must observe the many more, with which we have been compassed all our days. Many things had contributed to David's advancement, and he owns the hand of God in them all, to teach us to do likewise.