Why would you want to resize your partition you ask and not simply use the expand file system feature from raspi-config? The reason I discovered, as many others apparently have, is that not all SD cards are created equal and their storage capacity changes over time. Why is this an issue? It becomes an issue if you want to make an image of your SD card and write it to other SD cards. Even if you have the “same” size SD card, lets say 16GB, the actual capacity of the card may vary. Over time, the capacity of the SD card will also decrease as sectors become unusable. So the purpose of re-sizing the partition is to leave some empty space so that the image is slightly smaller and will fit on other SD cards. For example, if my SD card is 16GB, I might size the partition to 15GB or less so that it will work on other 16GB cards.
In any case, if you’re interested in doing this with your running Raspberry Pi from the command line, I created this post in the forum on how to do it based on another site. I tested it and it does work.