The literary technique that Mark Twain is using in this passage is "dialect". A dialect is a regional or social variety of a language. We can distinguish a dialect by the pronunciation, grammar, and/or vocabulary used.
In Mark Twain's passage, the dialect is used to give the reader an idea of how the charactet looks like.