In this passage, the literary technique that Twain is using is dialect, which is <em>a regional or social variety of language distinguished by pronunciation, grammar, and/or vocabulary.
</em>
In this particular passage, it is used to give the reader an idea, an image of the character.